创建用户
CREATE USER user [IDENTIFIED BY [PASSWORD] 'password']
删除用户
DROP USER user [, user] ...
刷新权限
FLUSH PRIVILEGES
分配权限
GRANT priv_type,... ON [object_type] {tbl_name | * | *.* | db_name.*} TO user [IDENTIFIED BY [PASSWORD] 'password'] [, user [IDENTIFIED BY [PASSWORD] 'password']] ... [WITH with_option]
用户名称重命名
RENAME USER old_user TO new_user [, old_user TO new_user] ...
收回权限
REVOKE priv_type, ... ON [object_type] {tbl_name | * | *.* | db_name.*} FROM user [, user] ...
收回全部权限
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...
设置新密码
SET PASSWORD FOR user = PASSWORD('some password')
作者:liuawei
链接:https://www.jianshu.com/p/ccbb57597db4