mysql-权限管理
时间:2021-07-01 10:21:17
帮助过:5人阅读
select User from user;
授权权限:
授予指定权限:
grant insert,
select on *.
* to ‘user_name‘@
‘localhost‘ with grant option; (
*.
*的意思:如:A.B
=> 数据库A中的表B)
授予所有权限:
grant all privileges on *.
* to ‘user_name‘@
‘localhost‘ with grant option;
查看权限:
show grants for ‘user_name‘@
‘localhost‘;
查看当前用户的权限:show grants;
回收权限:
回收指定权限:
revoke insert,
select,
grant option on *.
* from ‘user_name‘@
‘localhost‘ ...;
回收所有权限:
revoke all privileges,
grant option from ‘user‘@
‘localhost‘ ...;
grant insert,
select on *.
* to ‘zhangsan‘@
‘localhost‘ with grant option;
show grants for ‘zhangsan‘@
‘localhost‘;
mysql-权限管理
标签:ant bsp 指定 class with ges local option pre