创建修改删除用户
 
创建
create user 'test1'@'localhost/127.0.0.1' identified by '123' 本机权限
create user 'test1'@'%' identified by '123' 所有权限
删除
drop user 'user'@'host'
撤销用户权限

revoke all on *.* from 'test'@'localhost';

 

 
更改用户名

rename user 'test'@'localhost' to 'test1'@'%';
增加权限
GRANT ALL PRIVILEGES ON app.* TO [email protected]"%";
grant select,update(field1,field2) on dbname.tablename to 'test1'@'%'
grantselecton testdb.*to [email protected]'%'