首页 > IT职业 > IT职场 > mysql不能外网访问如何解决

mysql不能外网访问解决方法:
1、在/etc/mysql/my.cnf中的[mysqld]段注释掉bind-address = 127.0.0.1
2、给用户授权允许远程访问:
grant all privileges on *.* to root@"%" identified by "pwd" with grant option;
flush privileges;
推荐:MySQL教程
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1976/viewspace-2833860/ ,如需转载,请注明出处,否则将追究法律责任。