MySQL - 权限

查看用户当前权限

  show grants;

查看其他 MySQL 用户权限:
  show grants for '<username>'@'<host>';

授权

  grant <privileges> on <databasename.tablename> to '<username>'@'<host>' identified by '<123>';

  identified by非必须。

撤销权限

  revoke <privileges> on <databasename.tablename> from '<username>'@'<host>';

 

 

privileges:

全部权限:all privileges

其他权限参考:

https://www.cnblogs.com/fslnet/p/3143344.html

http://blog.csdn.net/wulantian/article/details/38230635

posted @ 2018-01-11 09:34  肉炒辣椒  阅读(124)  评论(0编辑  收藏  举报