mysql数据库访问授权

grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;

第一个root表示用户名,%表示所有的电脑都可以连接,也可以设置某个ip地址运行连接,第二个root表示密码。

flush privileges;

命令立即生效。

猜你喜欢

转载自lijun0349-163-com.iteye.com/blog/2395084