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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:04:16
Original
1087 people have browsed it

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 。


Related labels:
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template