环境是Docker+MySQL
在服务器端开启远程访问 首先进入mysql数据库,然后输入下面两个命令:
grant all privileges on *.* to 'root'@'%'; flush privileges;
重启MySQL服务