# /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>

相关文章:

  • 2021-12-01
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-11-07
  • 2021-11-23
  • 2021-10-29
  • 2021-11-05
  • 2022-12-23
相关资源
相似解决方案