# /etc/init.d/mysql 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/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>

相关文章:

  • 2022-12-23
  • 2021-06-24
  • 2021-07-27
  • 2022-12-23
  • 2021-08-26
  • 2021-08-23
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2021-08-08
  • 2021-12-30
  • 2022-12-23
  • 2022-01-12
相关资源
相似解决方案