# /etc/init.d/mysqld stop 

# mysqld_safe --user=mysql --skip-grant-tables --skip-networking & 

# mysql -u root mysql 

mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’; 

mysql> FLUSH PRIVILEGES; 

mysql> quit 

# /etc/init.d/mysqld restart 

# mysql -uroot -p 

Enter password: <输入新设的密码newpassword> 

mysql> 

相关文章:

  • 2022-12-23
  • 2021-05-27
  • 2021-07-08
  • 2021-08-30
  • 2021-05-25
  • 2021-09-01
  • 2021-08-01
猜你喜欢
  • 2021-08-22
  • 2021-04-20
  • 2021-10-14
  • 2021-06-02
  • 2021-04-02
  • 2021-04-03
相关资源
相似解决方案