mysql添加用户对指定库有权限

1、创建用户和密码

create user 'acc'@'%' IDENTIFIED by 'acc@password';

  

2、刷新授权

flush privileges;

  

3、设置对某个数据库的权限(增删改查可以设置一个或多个) access_control:数据库, acc:用户

grant create, select, insert, update, delete on access_control.* to acc@'%';

  

4, 刷新授权

flush privileges;

  

相关文章:

  • 2021-11-22
  • 2021-12-05
  • 2021-11-14
  • 2022-12-23
  • 2022-02-10
  • 2022-01-19
  • 2022-02-10
  • 2021-12-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
相关资源
相似解决方案