在从库上执行 show slave status\G

显示报错:

Last_IO_Error: error connecting to master 'repl@127.0.0.1:3316' - retry-time: 60 retries: 2 message: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.

考虑到我的MySQL8 ,

 

查看主库:

SELECT plugin FROM `user` where user = 'repl';

原来是主库repl的plugin是caching_sha2_password 导致连接不上,修改为mysql_native_password即可解决。

 

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

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐