转载:设置mysql的远程访问

1.登陆Mysql
mysql -u root -p
2.允许任何IP访问,其中密码为admin
grant all privileges on *.* to root@"%" identified by "admin" with grant option;
3.允许特定IP访问,其中密码为admin
grant all privileges on *.* to root@"192.168.0.1" identified by "passw0rd" with grant option; flush privileges;

猜你喜欢

转载自huiy.iteye.com/blog/1709871