#登录
mysql -u root -p123456 -P3306

#创建用户

insert into mysql.user(Host,User,Password) values('localhost','tyindon',password('123456'));

#刷新系统权限表
flush privileges;

这样就创建了一个用户名tyindon,密码123456的用户。

接下来给用户授权

#授权 给用户tyindon在所有(%表示)IP都能以密码123456 登录到php库
grant all privileges on php.* to tyindon@'%' identified by '123456';

#刷新系统权限表
flush privileges;

ok,权限分配好了

相关文章:

  • 2022-12-23
  • 2021-05-17
  • 2022-02-23
  • 2021-12-19
  • 2022-02-08
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2021-11-28
  • 2021-08-23
  • 2021-12-19
  • 2021-12-21
相关资源
相似解决方案