Home > Database > Mysql Tutorial > Window7下忘记MySQL ROOT密码_MySQL

Window7下忘记MySQL ROOT密码_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:35:07
Original
806 people have browsed it

bitsCN.com

Window7下忘记MySQL ROOT密码

 

解决步骤如下:

1. 停止mysql 服务

    net stop mysql

2. 以不检查权限的方式启动mysql

    mysqld --skip-grant-tables

    可以看到窗口光标在下一行的第一个位置闪烁,说明已经启动,不需要管。

3. 新建一个命令行窗口,启动mysql 

    mysql

4. 修改ROOT密码

    mysql>use mysql

    mysql>update user set password=PASSWORD('new_password') where user='root';

    mysql>flush privileges;

5. 看看任务管理器中是否有mysqld.exe进程,如果有,kill所有.

6. 重启mysql,用设置新密码登陆

    net start mysql

    mysql -u root -pnew_password 

bitsCN.com
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
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