mysql授权其他IP访问

注:必须使用root用户 
dbname:数据库名称
root:用户名    passwd:密码
 grant all privileges on dbname.* to root@'localhost' identified by 'passwd';
grant all privileges on  dbname.* to root@'127.0.0.1' identified by 'passwd';
grant all privileges on  dbname.* to root@'%' identified by 'passwd'; 

猜你喜欢

转载自tydldd.iteye.com/blog/2046837