Home > Database > Mysql Tutorial > 解决mysql密码忘记将mysql用户名密码恢复成password_MySQL

解决mysql密码忘记将mysql用户名密码恢复成password_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:36:25
Original
1266 people have browsed it

bitsCN.com


解决mysql密码忘记将mysql用户名密码恢复成password

 

打开命令行窗口,停止mysql服务: 

Net stop mysql 

启动mysql,一般到mysql的安装路径,找到 mysqld-nt.exe 

执行:mysqld-nt --skip-grant-tables 当前窗口将会停止。 

另外打开一个命令行窗口,执行mysql 如果提示没有这个命令,先进入MYSQL的安装位
置下BIN目录再运行mysql 

 

use mysql 

update user set password=password("password") where user="mysql"; 

flush privileges; 

exit 

用Ctrl+Alt+Del,找到mysqld-nt的进程杀掉它,在重新启动mysql-nt服务,就可以用新密码登录了
 

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template