项目mysql服务器开启了ssl连接,如果通过命令行直接-uroot -p是不能连接的。
报错如下:
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2061 (HY000): Authentication plugin 'sha256_password' reported error: Authentication requires SSL encryption
解决方法:
只需要添加参数--ssl-mode=required即可,完整命令行连接如下:
$ mysql -uroot -proot --ssl-mode=required
本文介绍了一个MySQL连接过程中遇到的问题:当使用'sha256_password'认证插件时,如果未启用SSL加密,则会遇到连接失败的情况。文章提供了解决方案,即在命令行中添加--ssl-mode=required参数来实现安全连接。
1085

被折叠的 条评论
为什么被折叠?



