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

原文地址:https://www.cnblogs.com/kangping/p/8266847.html