环境:
=========================================================================
(1)
创建用户
create user 'account1'@'localhost' identified by 'oldpwd1';
授予权限:
#给表授予权限
grant select,insert on Team.player to account1@localhost identified by 'oldpwd1';#给info字段授予update权限
grant update(info) on Team.player to 'account1'@'localhost';
(2)
root用户修改普通用户的密码
SET PASSWORD FOR 'account1'@'localhost' = PASSWORD ('newpwd2');
(3)
flush privileges;
(4)
show grants for account1@localhost;
(5)
#收回所有的权限
revoke all on Team.player from account1@localhost;
(6)
drop user account1@localhost;