首页 > 技术文章 > mysql 允许远程连接

songxuan 2019-07-19 13:21 原文

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

  

推荐阅读