MySQL ssl连接错误解决

项目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

猜你喜欢

转载自blog.csdn.net/lusyoe/article/details/78213595