1.用root 进入mysql后
mysql>set password =password('你的密码');
mysql>flush privileges;

2.使用GRANT语句
mysql>grant all on *.* to 'root'@'localhost' IDENTIFIED BY '你的密码'with grant option ;
mysql>flush privileges;

3.进入mysql库修改user表
mysql>use mysql;
mysql>update user set password=password('你的密码') where user='root';
mysql>flush privileges;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2022-12-23
  • 2021-11-28
  • 2022-01-16
  • 2021-10-28
  • 2021-05-28
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2021-12-21
  • 2021-05-21
  • 2021-05-06
  • 2021-11-25
相关资源
相似解决方案