Home  >  Article  >  Database  >  MySQL忘记超级用户口令的解决办法

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

WBOY
WBOYOriginal
2016-06-07 16:04:161042browse

MySQL忘记超级用户口令的解决办法 如果MySQL正在运行,首先杀之: killall -TERM mysqld。 启动MySQL:bin/safe_mysqld --skip-grant-tables 就可以不需要密码就进入MySQL了。 //from www.w3sky.com 然后就是 use mysql update user set password=password("

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

如果MySQL正在运行,首先杀之: killall -TERM mysqld。

启动MySQL:bin/safe_mysqld --skip-grant-tables &

就可以不需要密码就进入MySQL了。 //from www.w3sky.com

然后就是

>use mysql

>update user set password=password("new_pass") where user="root";

>flush privileges;

重新杀MySQL,用正常方法启动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