docker安装mysql后,本地navicat连接报错client does not support authentication

解决办法:
1. docker ps -a 查找到容器id
2. docker exec -it id /bin/bash 进入mysql容器 
3.mysql -u root -p root登陆mysql

4.alter user 'root'@'%' identified with mysql_native_password by '123456';

可能遇到问题:

Access denied for user 'root'@'localhost' (using password: YES)

解决办法:

update user set authentication_string = 'root' where user = 'root' and host = '%';
update user set authentication_string = 'root' where user = 'root' and host = 'localhost';

或者重新创建一个容器

相关文章:

  • 2021-06-22
  • 2022-12-23
  • 2021-12-25
  • 2021-11-12
  • 2021-12-27
  • 2021-06-07
猜你喜欢
  • 2021-04-22
  • 2021-09-14
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2021-10-14
  • 2022-03-01
相关资源
相似解决方案