vim /etc/my.cnf
注释这一行:bind-address=127.0.0.1 ==> #bind-address=127.0.0.1
保存退出。
mysql -uroot -p123456
为需要远程登录的用户赋予权限:
复制代码代码如下:
mysql> GRANT ALL PRIVILEGES ON *.* TO root@”%” IDENTIFIED BY “123456”;
mysql> flush privileges;
vim /etc/my.cnf
注释这一行:bind-address=127.0.0.1 ==> #bind-address=127.0.0.1
保存退出。
mysql -uroot -p123456
为需要远程登录的用户赋予权限:
复制代码代码如下:
mysql> GRANT ALL PRIVILEGES ON *.* TO root@”%” IDENTIFIED BY “123456”;
mysql> flush privileges;