Home  >  Article  >  Database  >  mysql忘掉root密码解决方案

mysql忘掉root密码解决方案

WBOY
WBOYOriginal
2016-06-07 16:24:58855browse

mysql忘记root密码解决方法 1·停止mysql服务 2·命令行输入 mysqld --skip-grant-tables(跳过权限检查启动mysql服务) 3·命令行输入 update MySQL.user set password=PASSWORD('新密码') where User='root'; flush privileges; quit 4·重新启动mysql服务

mysql忘记root密码解决方法
1·停止mysql服务
2·命令行输入
mysqld --skip-grant-tables(跳过权限检查启动mysql服务)  


3·命令行输入
update MySQL.user set password=PASSWORD('新密码') where User='root';     
flush privileges;     
quit 
  

4·重新启动mysql服务
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn