当前位置:
首页 >
MySQL grant 权限,分别可以作用在多个层次上
发布时间:2025/3/8
53
豆豆
生活随笔
收集整理的这篇文章主要介绍了
MySQL grant 权限,分别可以作用在多个层次上
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
1. grant 作用在整个 MySQL 服务器上: grant select on *.* to dba@localhost; -- dba 可以查询 MySQL 中所有数据库中的表。 grant all on *.* to dba@localhost; -- dba 可以管理 MySQL 中的所有数据库 2. grant 作用在单个数据库上: grant select on testdb.* to dba@localhost; -- dba 可以查询 testdb 中的表。 3. grant 作用在单个数据表上: grant select, insert, update, delete on testdb.orders to 4. grant 作用在表中的列上: grant select(id, se, rank) on testdb.apache_log to 5.MySQL grant 作用在存储过程、函数上: grant execute on procedure testdb.pr_add to 'dba'@'localhost' grant execute on function testdb.fn_add to 'dba'@'localhost'
总结
以上是生活随笔为你收集整理的MySQL grant 权限,分别可以作用在多个层次上的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 网页中查看pdf文档
- 下一篇: MySQL 直接存储图片并在 html