创建新用户

create user localuser identified by '666';
    注:'localuser' 即为新用户的用户名
        '666' 即为新用户的登录密码

为此新用户赋予操作某个数据库的权限

grant all privileges on students.* to 'localuser'@'%';
    注:'students' 即为指定的数据库
        '%' 即表示无论此用户以哪个IP操作都可以。

刷新数据库使刚才的操作生效

flush privileges;

相关文章:

  • 2022-01-12
  • 2021-06-09
  • 2021-07-27
  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
  • 2021-10-08
  • 2021-12-05
猜你喜欢
  • 2021-07-21
  • 2021-08-08
  • 2022-03-07
  • 2021-12-05
  • 2022-12-23
  • 2022-01-21
相关资源
相似解决方案