授予MySQL用户权限的语句 - Go语言中文社区

授予MySQL用户权限的语句


下面为您介绍的语句都是用于授予MySQL用户权限,这些语句可以授予数据库开发人员,创建表、索引、视图、存储过程、函数。。。等MySQL用户权限。

grant 创建、修改、删除 MySQL 数据表结构权限。

grant create on testdb.* to developer@'192.168.0.%';
grant alter  on testdb.* to developer@'192.168.0.%';
grant drop   on testdb.* to developer@'192.168.0.%';

grant 操作 MySQL 外键权限。

grant references on testdb.* to developer@'192.168.0.%';

grant 操作 MySQL 临时表权限。

grant create temporary tables on testdb.* to developer@'192.168.0.%';

grant 操作 MySQL 索引权限。

grant index on  testdb.* to developer@'192.168.0.%';

grant 操作 MySQL 视图、查看视图源代码权限。

grant create view on testdb.* to developer@'192.168.0.%';
grant show   view on testdb.* to developer@'192.168.0.%';

grant 操作 MySQL 存储过程、函数权限。

grant create routine on testdb.* to developer@'192.168.0.%';  -- now, can show procedure status
grant alter  routine on testdb.* to developer@'192.168.0.%';  -- now, you can drop a procedure
grant execute        on testdb.* to developer@'192.168.0.%';

以上就是MySQL用户权限的语句介绍。

版权声明:本文来源51CTO,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:http://database.51cto.com/art/201010/229503.htm
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2021-06-12 11:51:50
  • 阅读 ( 958 )
  • 分类:数据库

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢