Configure the MySQL account associate to the domain user via MySQL Windows Authentication Plugin
在此记录如何将之前一次做第三发软件在配置的过程。 将AD user通过代理映射到mysql 用户。
在Mysql官网有这样一段话:
The server-side Windows authentication plugin is included only in commercial distributions. It is not included in MySQL community distributions. The client-side plugin is included in all distributions, including community distributions. The Windows authentication plugin should work on Windows 2000 Professional and up. It requires MySQL Server 5.5.16 or newer.
这个只在商业版上有这种Windows authentication plugin
On the server side:
1. Install the Windows Authentication Plugin:
Method 1). Put these lines in my.ini(C:\Program Files\MySQL\MySQL Server5.5) file:
[mysqld]
plugin-load=authentication_windows.dll
Then restart MySQL service.
Method 2). Launch MySQL server as root user and run the following commands:
mysql>install plugin authentication_windows_server soname 'authentication_windows.dll';
mysql>show plugins;
Installed the Windows Authentication Plugin successfully if you see the following information.
2. Using the Windows Authentication Plugin to create user map to domain groups or users:
1). Create the proxy MySQL account "win_proxy" for Windows users(xxx.test\\administrator, xxx.test\\dzuser2) to connect to, and configure this account so that users and groups map to the appropriate MySQL accounts("mysql_admin", "mysql_user"):
c:\>mysql --user=root --password=password
mysql>create user win_proxy identified with authentication_windows as 'xxx.test\\administrator=mysql_admin, xxx.test\\dzuser2=mysql_user';
2). For proxying to work, the proxied accounts must exist, so create them and grant some privileges to them:
mysql>create user mysql_admin identified by 'password';
mysql>create user mysql_user identified by 'password';
mysql>grant all privileges on *.* to 'mysql_admin'@'%'; all privileges on MySQL instance
mysql>grant all privileges on mysql.* to 'mysql_user'@'%';privileges on mysql database
3). Grant the PROXY privilege for each of the proxied accounts to the proxy account:
mysql>grant proxy on mysql_admin to win_proxy;
mysql>grant proxy on mysql_user to win_proxy;
Now the Windows users "xxx.test\\administrator" can connect to the MySQL server as "win_proxy" and when authenticated have the privileges of the account "mysql_admin".
"xxx.test\\dzuser2" can connect to the MySQL server as "win_proxy" and when authenticated have the privileges of the account "mysql_user"
Check the configuration whether take effect on the client side:
1. Logon the OS as user "xxx.test\\administrator":
c:\>mysql -u win_proxy -h10.100.xx.xx (the MySQL server IP)
mysql> select user(),current_user(),@@proxy_user;
+----------------------+----------------+-----------------+
| user() | current_user() | @@proxy_user |
+----------------------+----------------+-----------------+
| win_proxy@xxx | mysql_admin@% | 'win_proxy'@'%' |
+----------------------+----------------+-----------------+
1 row in set (0.02 sec)
Domain user "xxx.test\\administrator" map to the MySQL account "mysql_admin" successfully.
2. Logon the OS as user "xxx.test\\dzuser2":
c:\>mysql -u win_proxy -h10.100.60.38 (the MySQL server IP)
mysql> select user(),current_user(),@@proxy_user;
+----------------------+----------------+-----------------+
| user() | current_user() | @@proxy_user |
+----------------------+----------------+-----------------+
| win_proxy@xxx | mysql_user@% | 'win_proxy'@'%' |
+----------------------+----------------+-----------------+
1 row in set (0.02 sec)
Domain user "xxx.test\\dzuser2" map to the MySQL account "mysql_user" successfully.
Configure the MySQL account associate to the domain user via MySQL Windows Authentication Plugin的更多相关文章
- 连接mysql客户端报错: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'
报这个错可能是因为用了低版本的的客户端.驱动连接高版本的mysql服务器. 解决方式有三种:升级客户端版本.修改服务端认证方式和适应服务端认证方式. 我是通过升级客户端版本解决,参考一下链接: Upg ...
- mysql的TABLE_SCHEMA的sql和information_schema表, MySQL管理一些基础SQL语句, Changes in MySQL 5.7.2
3.查看库表的最后mysql修改时间, 如果第一次新建的表可能还没有update_time,所以这里用了ifnull,当update_time为null时用create_time替代 select T ...
- Navicat连接MySQL,出现2059 - authentication plugin 'caching_sha2_password'的解决方案
昨天当我把MySQL的安装程序下载并安装好,然后又下载了另外一个工具来使用它,该工具的名称是Navicat Premium,当我通过该工具连接MySQL Workbench的时候,无法连接,提示“20 ...
- configure: error: Cannot find libmysqlclient under /usr Note that the MySQL client library is not bundled anymore! 报错解决
错误说明 今天在centos 6.3 64位版本上安装PHP5.4.3时在./configure 步骤的时候出现了下面错误configure: error: Cannot find libmysqlc ...
- mysql basic operation,mysql总结,对mysql经常使用语句的详细总结,MySQL学习笔记
mysql> select * from wifi_data where dev_id like "0023-AABBCCCCBBAA" ; 1.显示数据库列表.show d ...
- MySQL数据库的优化(上)单机MySQL数据库的优化
MySQL数据库的优化(上)单机MySQL数据库的优化 2011-03-08 08:49 抚琴煮酒 51CTO 字号:T | T 公司网站访问量越来越大,导致MySQL的压力越来越大,让我们自然想到的 ...
- 【MySQL】源码编译安装和配置MySql 5.5.32(单实例)
[需求描述] 在CentOS环境中,通过编译源码的方式,安装并且配置“单实例”的MySQL5.5.32数据库. MySQL的安装目录为:/application/mysql-5.5.32 MySQL数 ...
- redis作为mysql的缓存服务器(读写分离,通过mysql触发器实现数据同步)
一.redis简介Redis是一个key-value存储系统.和Memcached类似,为了保证效率,数据都是缓存在内存中.区别的是redis会周期性的把更新的数据写入磁盘或者把修改操作写入追加的记录 ...
- Using a Microsoft Account to Logon and Resulting Internet Communication in Windows 8
Using a Microsoft Account to Logon and Resulting Internet Communication in Windows 8 此主题尚未评级 - 评价此主题 ...
随机推荐
- Android最佳实践之SystemBar状态栏全版本适配方案
前言 自从MD设计规范出来后,关于系统状态栏的适配越受到关注,因为MD在5.0以后把系统状态栏的颜色改为可由开发者配置的,而在5.0之前则无法指定状态栏的颜色,所以这篇就说说使用Toolbar对系统状 ...
- linq---我为你提笔序,你的美不只查询语句
LinQ百度百科对她这样解释,是一组用于c#和Visual Basic语言的扩展.它允许编写C#或者Visual Basic代码以查询数据库相同的方式操作内存数据. LINQ是Language Int ...
- 读生产环境下go语言最佳实践有感
最近看了一篇关于go产品开发最佳实践的文章,go-in-procution.作者总结了他们在用go开发过程中的很多实际经验,我们很多其实也用到了,鉴于此,这里就简单的写写读后感,后续我也争取能将这篇文 ...
- 【自制插件】MMD4Maya
这个是之前MMD4MecanimImport的升级版,把pmx2fbx.exe整合了进来,不再需要Unity和MotionBuilder. 测试maya2015, maya2016可以用.maya20 ...
- UNIX环境高级编程——信号之kill、raise、killpg、alarm、pause、abort、sleep、usleep、nanosleep和setitimer函数
一.kill, raise, killpg 函数 int kill(pid_t pid, int sig); int raise(int sig); int killpg(int pgrp, int ...
- GDAL中MEM格式的简单使用示例
GDAL库中提供了一种内存文件格式--MEM.如何使用MEM文件格式,主要有两种,一种是通过别的文件使用CreateCopy方法来创建一个MEM:另外一种是图像数据都已经存储在内存中了,然后使用内存数 ...
- 柔弱的APP如何自我保护,浅谈APP防御手段,使用360加固助手加固/签名/多渠道打包/应用市场发布
柔弱的APP如何自我保护,浅谈APP防御手段,使用360加固助手加固/签名/多渠道打包/应用市场发布 由于JAVA和Android的平台型,所以APP很容易被反编译,这对于我们开发者来说,是一个不想要 ...
- 幂次法则power law
幂次法则分布和高斯分布是两种广泛存在的数学分布.可以预测和统计相关数据. pig中用其处理数据倾斜,实现负载均衡. 个体的规模和其名次之间存在着幂次方的反比关系,R(x)=ax(-b次方) 其中,x为 ...
- github管理的建立(SSH Key生成步骤)
Git是分布式的代码管理工具,远程的代码管理是基于SSH的,所以要使用远程的Git则需要SSH的配置. github的SSH配置如下: 一 . 设置Git的user name和email: $ git ...
- 小强的HTML5移动开发之路(6)——Canvas图形绘制基础
来自:http://blog.csdn.net/dawanganban/article/details/17686039 在前面提到Canvas是HTML5中一个重要特点,canvas功能非常强大,用 ...