添加用户:

create user 'gouge'@'localhost' identified by 'gouge';

赋予权限:

给gouge 用户赋予所有test开头的数据库权限 (test% 代表已test开头的数据库,如果指定单个数据库去掉%即可)

1 grant select,insert,update,delete,create,drop,alter on `test%`.* to 'gouge'@'%' identified by 'gouge';
2 FLUSH PRIVILEGES;

// 给所有表加权限
grant all privileges  on *.* to 'gouge'@'%' identified by 'gouge';

添加最高权限

grant ALL PRIVILEGES on `test%`.* to 'gouge'@'%' identified by 'gouge';
FLUSH PRIVILEGES;

 

相关文章:

  • 2021-12-17
  • 2022-12-23
  • 2021-08-12
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-24
  • 2021-08-06
  • 2022-01-13
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案