Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-01 14:00:58
Original
736 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

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!