linux使用docker安裝mysql,連接報錯1251 client does no support authentic
通過navicat工具連接mysql報錯1251 client does no support authentic,
1.docker exec -it mysql /bin/bash
2.mysql -uroot -proot
3.查看用戶信息
select host,user,plugin,authentication_string from mysql.user;
4.修改用戶密碼
ALTER USER ‘root’@’%’ IDENTIFIED WITH mysql_native_password BY ‘123456’;
更新user爲root,host爲% 的密碼爲123456
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘123456’;
更新user爲root,host爲localhost 的密碼爲123456
5.成功