MySQL数据库添加用户配置权限

今天为MySQL增加了用户在配置权限的时候出现了问题,问题得到了解决。我想应该记录下来,希望可以帮到其他同学。

添加用户以及配置权限

添加用户

mysql>insert into mysql.user(Host,User,Password)      value('192.168.1.206','www','123456');

配置权限

mysql>grant select,update,insert,delete on *.* to [email protected] identified by '123456';

若为新增用户添加权限出现 ERROR 1133 (42000): Can’t find any matching row in the user table,需要刷新授权列表

mysql>flush privaliges;

以上添加用户,配置权限还有另外一种方式

mysql>create user '[email protected]' identified by '123456';

mysql>grant all on *.* to '[email protected]';

猜你喜欢

转载自www.linuxidc.com/Linux/2017-01/139808.htm