https://blog.csdn.net/qq_33833327/article/details/104776200
https://blog.csdn.net/wanniwa/article/details/89880610
1、修改root账号远程访问权限
use mysql
select host, user from user;
2、#如果存在了root host是%则无需执行
update user set host="%" where user='root';
3、设置用户权限
GRANT ALL ON *.* TO 'root'@'%';
flush privileges;
4、设置防火墙
$ firewall-cmd --zone=public --add-port=3306/tcp --permanent
$ firewall-cmd --reload