1.采用create user

e.g.  create user 'username'@'host' identified by 'password';

 

2.采用grant语句

e.g.  grant all privileges on *.* to 'username'@'host' identified by 'passwd' with grant option;

 

3.直接用insert语句插入mysql.user表中

e.g. 

use mysql;

insert into user(user,host,password) values('test4','192.168.203.128',password('123456'));

 

相关文章:

  • 2023-02-18
  • 2022-12-23
  • 2021-10-23
  • 2021-07-30
  • 2021-12-31
  • 2021-12-09
  • 2021-09-12
猜你喜欢
  • 2022-02-08
  • 2022-12-23
  • 2022-02-08
  • 2021-11-07
相关资源
相似解决方案