Docker中运行MySQL容器,想要远程连接时出现以下问题:
解决方案:
1.进入mysql容器
docker exec -it CONTAINERID /bin/bash
2.进入mysql
mysql -u root -p mima
3.修改密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
Docker中运行MySQL容器,想要远程连接时出现以下问题:
解决方案:
1.进入mysql容器
docker exec -it CONTAINERID /bin/bash
2.进入mysql
mysql -u root -p mima
3.修改密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';