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 端口

  

posted @ 2019-07-19 13:21  小猪哥哥  阅读(6156)  评论(0编辑  收藏  举报