创建用户
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
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦