#创建用户
create user teacher @localhost identified by ‘123456’;
create user student @localhost ;
#查看用户
select user,host from mysql.user;
#创建用户并授权
grant select,update on ATM_bankDB.view_cardinfo to [email protected] identified by ‘123456’;
grant select,update on ATM_bankDB.userinfo· to [email protected] identified by ‘123456’;
#授权视图查询权限
grant select on ATM_bankDB.atm_a to [email protected];
#修改当前用户密码
set password=PASSWORD(‘root’);
#修改其他用户密码
set password for [email protected] =PASSWORD(‘root’);
#删除用户
drop user [email protected];
MySQL用户管理和授权

相关文章:

  • 2021-04-11
  • 2021-09-07
  • 2021-05-15
  • 2021-12-11
  • 2021-09-07
  • 2021-09-07
  • 2022-12-23
猜你喜欢
  • 2021-09-28
  • 2021-09-07
  • 2021-06-02
  • 2021-12-23
  • 2021-11-22
相关资源
相似解决方案