创建用户: 

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';