====================忘了mysql密码,从网上找到的解决方案记录在这里====================

结束当前正在运行的mysql进程

# /etc/init.d/mysql stop

用mysql安全模式运行并跳过权限验证

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

用空密码方式使用root用户登录 MySQL

#  mysql -u root mysql 

更新密码

# update user set Password = PASSWORD('root') where User ='root';

刷新权限

# FLUSH PRIVILEGES; 

退出

# quit

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2022-01-08
  • 2021-11-28
  • 2021-08-02
  • 2022-02-18
  • 2021-05-23
猜你喜欢
  • 2021-11-13
  • 2022-12-23
  • 2021-09-17
  • 2021-11-28
  • 2021-11-28
  • 2021-12-08
相关资源
相似解决方案