Mysql开启远程服务

开启远程服务:

登录mysql:

//赋予root用户所有权限,远程登录密码是123456

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

设置Linux的防火墙:

Linux(CentOs)防火墙默认拦截3306端口

/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
/etc/rc.d/init.d/iptables save
posted @ 2018-05-06 23:44  的川  阅读(217)  评论(0编辑  收藏  举报