解决无法远程登录Docker中的MySQL
步骤:
进入mysql容器
登录mysql
授予远程登录权限
刷新权限,并退出
命令参考:
docker exec -it [mysql] /bin/bash
mysql -u root -p
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
flush privileges;
exit;
let the world have no hard-to-write code ^-^