授予mysql的其他用户数据库的使用权限

场景:不同的开发人员有不同的数据库的权限;也可适用于外包公司不同的开发权限。
root用户登录数据库,命令行执行下面语句即可。

grant select,delete,update,create,drop on 数据库名.* to '用户名'@'%';

或者:grant all on 数据库名.* to '用户名'@'%';

例如:

grant select,delete,update,insert,create,drop on test.* to 'kfuser'@'%';
或
grant all on test.* to 'kfuser'@'%';

猜你喜欢

转载自www.cnblogs.com/zhangww/p/11822954.html