创建用户:
CREATE USER ‘username‘@‘host‘ IDENTIFIED BY ‘password‘;
用户删除:
DROP USER ‘username‘@‘host‘;
创建用户并授权:
GRANT privileges ON databasename.tablename TO ‘username‘@‘host‘ IDENTIFIED BY ‘password‘ ;
用授权户:
GRANT privileges ON databasename.tablename TO ‘username‘@‘host‘;
撤销用户权限:
REVOKE privileges ON databasename.tablename FROM ‘username‘@‘host‘;
用户访问权限更改:
UPDATE mysql.user SET host = ‘host‘ WHERE user =‘root‘;
本文出自 “汪立明” 博客,请务必保留此出处http://afterdawn.blog.51cto.com/7503144/1834711
原文地址:http://afterdawn.blog.51cto.com/7503144/1834711