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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章