数据库
首页 > 数据库> > mysql创建用户并授权指定库权限

mysql创建用户并授权指定库权限

作者:互联网

创建用户

CREATE USER 'testUser'@'%' IDENTIFIED BY 'testUser';

授权

GRANT SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, TRIGGER, CREATE VIEW, SHOW VIEW, EXECUTE, 
ALTER ROUTINE, CREATE ROUTINE, CREATE TEMPORARY TABLES, LOCK TABLES, EVENT ON `test`.task TO 'testUser'@'%';

标签:TABLES,testUser,CREATE,mysql,ROUTINE,授权,权限,ALTER,VIEW
来源: https://www.cnblogs.com/336hzh/p/16362279.html