Navicat连接mysql报错
错误信息: 1.Client does not support authentication protocol requested by server; consider upgrading MySQL
2.Authentication plugin 'caching_sha2_password' cannot be loaded
解决:
- 进入容器:docker exec -it mysql-name bash (mysql-name为容器名称)
- 登陆:mysql -u root -p #接着输入mysql密码
-
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '你的密码'; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码'; SELECT plugin FROM mysql.user WHERE User = 'root';
退出容器:Ctrl+P+Q
原文:https://blog.csdn.net/qq_19707521/article/details/80226321