1)create user ‘user1’@’%’ identified by ‘password’;
2) grant all privileges on dbname.* to ‘user1’@’%’;
查看 show grants for ‘user1’;
3) revoke all privileges on dbname.* from ‘user1’@’%’;
查看 show grants for ‘user1’;
4) drop user ‘user1’@’%’
简化的方式是:
1)grant all privileges on ssapi.* to zhangsan@’%’ identified by ‘zhangsanpassword’;
2) drop user ‘zhangsan’;