mysql用户创建,授权,取回,删除

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

发表评论

邮箱地址不会被公开。 必填项已用*标注