bitscn.com
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;
远程登录命令:
mysql -h 223.4.92.130 -uroot -p(-h后跟的是要登录主机的ip地址)
bitscn.com