打开MySQL远程登陆的功能

以ubutun为例

1. 将mysql用户设定为可远程登陆

root从所有主机:grant all privileges on *.* to root@'%' identified by 'root的密码' with grant option;


2. vi /etc/mysql/my.cnf

在[mysqld]段落下增加 skip-name-resolve,并将bind-address = 127.0.01 屏蔽掉

你可能感兴趣的:(打开MySQL远程登陆的功能)