docker使用root用户访问宿主机数据库报错问题解决

进入宿主机命令行

通过mysql用户名root和密码进入数据库

mysql -uroot -p555555555555

执行命令

按以下步骤执行

grant all privileges on *.* to root@'%' identified by '555555555555' with grant option;
flush privileges;
exit;
微信交流
微信交流

扫码添加微信,可相互交流学习.