Neurohazard
暮雲煙月,皓首窮經;森羅萬象,如是我聞。

Set Up Remote Access in MySQL

wpadmin~May 22, 2018 /System Management

MySQL 配置外网访问。

测试环境

#
#
Ubuntu 18.04
MySQL 5.7.22

配置过程

编辑 /etc/mysql/my.cnf ,添加如下配置。

#
#
[mysqld]
bind-address = 0.0.0.0

配置用户 (不建议配置 root 远程登陆)

#
#
GRANT ALL PRIVILEDGES ON *.* TO 'root'@'%' identified By 'password';
grant all on vuldb.* to vuluser@'%' identified by 'vulpassword';

然后重启

#
#
service mysql restart

再次检查权限情况

#
#
select user, host from mysql.user;

参考资料

http://www.cnblogs.com/tovep/archive/2012/10/09/2716672.html

Leave a Reply

Your email address will not be published. Required fields are marked *