- 开启mysql容器
docker exec -it ss_mysql /bin/bash
- 登录mysql
mysql -u root -p
密码enter后,再输入 - 查看状态(可略过)
select host,user,plugin,authentication_string from mysql.user;
- 修改用户
ALTER USER ‘root’@’%’ IDENTIFIED WITH mysql_native_password BY ‘newpassword’;
newpassword改为自己的密码 - 刷新服务 (必须刷新服务,配置才生效)
flush privileges;
远程连接docker的mysql容器 解决1251 client does not support authentication protocol 问题
最新推荐文章于 2024-06-13 15:18:53 发布