用户和访问权限的操作

1)创建hello用户,可在本机登陆,密码为hello
create user [email protected] identified by ‘hello’;
另一个shell中登陆该用户
Mysql数据库用户和访问权限

创建用户hello,可在远程登陆,密码为hello
create user [email protected]’%’ identified by ‘hello’;

2)给[email protected]用户授权,如果为all,授权所有权限
grant all on forever. to [email protected];*

3)查看用户授权
show grants for [email protected];
Mysql数据库用户和访问权限
4)删除指定用户授权
revoke delete,update on forever. from [email protected];*
Mysql数据库用户和访问权限

5)刷新,重载授权表
flush privileges;

6)删除用户
drop user [email protected];
Mysql数据库用户和访问权限

相关文章:

  • 2021-08-29
  • 2021-12-28
  • 2021-10-15
  • 2021-12-05
  • 2022-01-03
  • 2021-11-18
  • 2023-03-21
猜你喜欢
  • 2021-09-30
  • 2022-12-23
  • 2022-02-01
  • 2021-07-06
  • 2021-12-05
  • 2022-12-23
  • 2021-06-07
相关资源
相似解决方案