设为首页 加入收藏

TOP

MySQL8.0关于caching_sha2_password Plugin的一个Bug
2019-09-17 18:29:40 】 浏览:19
Tags:MySQL8.0 关于 caching_sha2_password Plugin 一个 Bug

今天在调试使用ansible进行标准化安装MySQL8.0时,发现关于caching_sha2_password plugin的一个bug。

在搭建主从复制时,按照手册说明需要创建用户:

create user repl@'%' identified by 'repl4Password';
grant replication slave on *.* to repl@'%';

然后在从库执行:

change master to master_host ='master_ip',master_port=3306,master_user='repl',master_password='repl4Password',master_auto_position=1;
start slave;

悲催的是,发现从库的IO_Thread提示连不上主库。

而如果在从库上直接使用mysql命令行用这个帐号登陆主库是OK的,更加神奇的是在从库上使用mysql命令行登录过这个帐号之后,这个帐号就像被激活了一般,IO_Thread就能自动连上主库了。

当然,如果使用5.7的mysql_native_password模式来更新一下密码,是不需要这个“激活”过程的。

ALTER USER 'repl'@'%' IDENTIFIED WITH mysql_native_password BY 'repl4Password';

手册中关于这个“激活”过程,是没有任何说明的。今天在知数堂群里跟同学们交流了一下,也有同学出现过同样的现象。所以在此大胆猜测这就是一个Bug。

PS:我的实验环境是CentOS6.5,使用的MySQL版本是当前最新的8.0.15

本文地址:https://www.cnblogs.com/ajiangg/p/10473972.html

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇大数据---Ranger-1 下一篇mysql-8.0.15允许外网访问

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目