在此记录如何将之前一次做第三发软件在配置的过程。 将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的更多相关文章

  1. 连接mysql客户端报错: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'

    报这个错可能是因为用了低版本的的客户端.驱动连接高版本的mysql服务器. 解决方式有三种:升级客户端版本.修改服务端认证方式和适应服务端认证方式. 我是通过升级客户端版本解决,参考一下链接: Upg ...

  2. 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 ...

  3. Navicat连接MySQL,出现2059 - authentication plugin 'caching_sha2_password'的解决方案

    昨天当我把MySQL的安装程序下载并安装好,然后又下载了另外一个工具来使用它,该工具的名称是Navicat Premium,当我通过该工具连接MySQL Workbench的时候,无法连接,提示“20 ...

  4. 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 ...

  5. mysql basic operation,mysql总结,对mysql经常使用语句的详细总结,MySQL学习笔记

    mysql> select * from wifi_data where dev_id like "0023-AABBCCCCBBAA" ; 1.显示数据库列表.show d ...

  6. MySQL数据库的优化(上)单机MySQL数据库的优化

    MySQL数据库的优化(上)单机MySQL数据库的优化 2011-03-08 08:49 抚琴煮酒 51CTO 字号:T | T 公司网站访问量越来越大,导致MySQL的压力越来越大,让我们自然想到的 ...

  7. 【MySQL】源码编译安装和配置MySql 5.5.32(单实例)

    [需求描述] 在CentOS环境中,通过编译源码的方式,安装并且配置“单实例”的MySQL5.5.32数据库. MySQL的安装目录为:/application/mysql-5.5.32 MySQL数 ...

  8. redis作为mysql的缓存服务器(读写分离,通过mysql触发器实现数据同步)

    一.redis简介Redis是一个key-value存储系统.和Memcached类似,为了保证效率,数据都是缓存在内存中.区别的是redis会周期性的把更新的数据写入磁盘或者把修改操作写入追加的记录 ...

  9. 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 此主题尚未评级 - 评价此主题 ...

随机推荐

  1. hive中使用case、if:一个region统计业务(hive条件函数case、if、COALESCE语法介绍:CONDITIONAL FUNCTIONS IN HIVE)

    前言:Hive ql自己设计总结 1,遇到复杂的查询情况,就分步处理.将一个复杂的逻辑,分成几个简单子步骤处理. 2,但能合在一起的,尽量和在一起的.比如同级别的多个concat函数合并一个selec ...

  2. PLSQL解析XML文件

     参考网上资料学习汇总 在PL/SQL中利用XML ,Oracle提供了几个组件,让开发人员能轻松地利用XML技术.这些组件包括: 1.  XML 分析程序.即用来分析.构造和验证XML文档.. ...

  3. 【Unity Shaders】Vertex & Fragment Shader入门

    写在前面 三个月以前,在一篇讲卡通风格的Shader的最后,我们说到在Surface Shader中实现描边效果的弊端,也就是只对表面平缓的模型有效.这是因为我们是依赖法线和视角的点乘结果来进行描边判 ...

  4. 学习笔记3-开发与运行(卸载)第一个ANDROID应用

    新建Android项目 1.      配置好Android坏境以后,新建项目选择Android Project. 2.      选择针对哪个平台开发的应用(Android2/Android4等) ...

  5. MyBatis进阶(一)运行原理

    初次学习MyBatis,自己花了不少时间,理解一件事物是需要时间的.经过多次反复的理解,你的认知能力就可以得到提升.以下是学习MyBatis的一些理解认识,技术理解上若有不当之处,敬请朋友们提出宝贵意 ...

  6. www-authenticate与BASE-64认证技术

    www-authenticate是一种简单的用户身份认证技术.很多验证都采用这种验证方式,尤其在嵌入式领域中.优点:方便缺点:这种认证方式在传输过程中采用的用户名密码加密方式为BASE-64,其解码过 ...

  7. UICollectionView请求网络数据显示(Text)

    TEXT: AppDelegate.m self.window.rootViewController = [[[UINavigationController alloc]initWithRootVie ...

  8. Dynamics crm2013 IFD部署后启用多组织

    对CRM的多组织都不会陌生,在常规模式下新建组织后更改下url后面的组织名称即可访问新的组织了,而在部署IFD后就需要注意两点:1.域名的DNS解析:2.relying patry trust的更新 ...

  9. Guava 教程(4):条件,多重映射和分片

    原文出处: oschina 在本系列博客的前三章,我们大概介绍了Google的Guava类库和Collections类库,作为一名Java开发人员,相信你会从使用这些类库,进而来减少在你项目中使用样板 ...

  10. Ajax核心--XMLHttpRequest对象

    XMLHttpRequest 对象是AJAX功能的核心,学习XMLHttpRequest对象就先从创建XMLHttpRequest 对象开始,了解在不同的浏览器中创建XMLHttpRequest 对象 ...