Home > Database > Mysql Tutorial > 解决办法之MySQL忘记超级用户口令_MySQL

解决办法之MySQL忘记超级用户口令_MySQL

WBOY
Release: 2016-06-01 14:11:47
Original
914 people have browsed it

  如果MySQL正在运行,首先杀之: killall -TERM mysqld。
  
  启动MySQL:bin/safe_mysqld --skip-grant-tables &
  
  就可以不需要密码就进入MySQL了。
  
  然后就是
  
  >use mysql
  
  >update user set password=password("new_pass") where user="root";
  
  >flush privileges;
  
  重新杀MySQL,用正常方法启动MySQL 。
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template