mysql ssh远程连接报错:
host ‘’is not allowed to connect to this mysql server
原因是自己安装的mysql不允许远程登陆
解决方案:
第一步进入容器:docker exec -it a5c08a5976e4 /bin/bash
第二步登录mysql:mysql -u root -p
第三步:输入use mysql;
第四步:输入update user set host = ‘%’ where user = ‘root’;
第五步:输入FLUSH PRIVILEGES;
然后测试连接,成功连接上docker内的mysql
原文章:host ‘‘ is not allowed to connect to this mysql server连接mysql时报错。_如鸿毛的博客-CSDN博客