Home > Database > Mysql Tutorial > mysql忘记密码_MySQL

mysql忘记密码_MySQL

WBOY
Release: 2016-06-01 13:04:00
Original
1080 people have browsed it

有时候突然忘记MySQL的密码会真的不爽,这里介绍一种MySQL密码忘记时重置密码的方法,操作系统win8,MySql version:5.6.10

1 在任务管理器里面关闭掉mysql.exe,mysqld.exe进程;

2 在MySQL安装的文件夹里面打开cmd窗口(shift+右键)

输入mysqld –skip-grant-tables,如下所示:

\

它大概意思就是跳过授权表。

3 登陆

此时登陆的密码为空,所以在Enter password的时候直接回车就行。结果如下所示:

\

4 修改密码

Update mysql.user set password=password(‘xxx’)where user = ‘root’;

具体如下所示:

\

5 刷新

在修改完密码后记得要刷新要不然等关闭程序后下次登陆还是之前的密码,刷新就一句话:

Flush privileges;

6 重启

关闭mysql,mysqld,然后重新启动。

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