天天看點

Mysql連接配接 1251 client does not support解決

經過我的多番查找,總算了解決了,現在再次記錄下:(二〇一八年十二月二日 22:16:37)

1、問題出現在,Mysql資料庫的預設加密規則:

1)plugin在mysql_native_password狀态下,才能使用目前的密碼使用資料庫視圖工具連結資料庫

1)plugin在caching_sha2_password狀态下,使用資料庫操作工具就會報1251錯誤

2、使用指令行輸入mysql -u root -p

接着輸入自己設定的資料庫的密碼

Mysql連接配接 1251 client does not support解決

3、進入資料庫之後,輸入: select host,user,plugin,authentication_string from mysql.user;

查詢狀态,如圖:

Mysql連接配接 1251 client does not support解決

若是如我的 mysql_native_password 是沒有問題的(本人的問題解決了,總不好為了一個圖檔去修改吧(*^__^*) 嘻嘻)

盜圖一張:來源見圖檔水印

Mysql連接配接 1251 client does not support解決

4、修改密碼,可将plugin狀态改變為musql_native_password 

在指令行中輸入:ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '12345';

将資料庫的密碼修改為:12345,

再次查詢一下狀态 :select host,user,plugin,authentication_string from mysql.user;

就可以連接配接的上去咯!

Mysql連接配接 1251 client does not support解決

記得exit退出哦(*^__^*) 嘻嘻