mysql创建用户,授权

创建用户
CREATE USER test identified by '123456'
赋于权限
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
ON mydb.*
TO [email=%27test%27@%27localhost%27]'test'@'localhost'[/email]
IDENTIFIED BY '123456';
  
删除用户
drop user [email=test@localhost]test@localhost[/email];
取消权限
REVOKE SELECT,INSERT,UPDATE,DELETE,CREATE,DROP on mydb.*   FROM[email=test@%27localhost%27]test@'localhost'[/email];
备注:
赋于权限语句执行时如果用户不存在,会自动建立.所以一般只会执行此语句就可以了.

上一篇: Debian下Mldonkey 配置手记   下一篇: linux下IPTABLES配置详解[转]

提交疑问

回顶部