下面为您介绍的语句都是用于授予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用户权限的语句介绍。
【编辑推荐】
【责任编辑:段燃 TEL:(010)68476606】
点赞 0
本文介绍了MySQL中用于授予用户各种数据库操作权限的SQL语句。包括创建、修改和删除数据表结构,操作外键、临时表、索引、视图及存储过程等。适用于数据库管理员和开发人员。
4486

被折叠的 条评论
为什么被折叠?



