mysql 允许远程连接

1.授权root用户,密码123456,允许远程连接;

  root =》 用户名  % =》允许所有主机ip,可以单独指定 ip 123456=》密码

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

2.将配置写入mysql 授权表中

flush privileges;

  

3.防火墙开启 3306 端口

  

原文地址:https://www.cnblogs.com/songxuan/p/11212694.html