Home > Database > Mysql Tutorial > body text

mysql找回root密码的方法

WBOY
Release: 2016-06-07 17:51:22
Original
1326 people have browsed it

分享一篇关于大家会常常碰到的问题,就是突然不记得了mysql服务器的root密码了,有的朋友就直接重装系统,这也是办法,但我们提供更方便的找回mysql root密码的方法哦。

1、windows 下;

2、服务管理器wamp5;


二话不说直下正题:

1、打开任务管理器,结束进程 d-nt.exe 如图:

 

2、运行命令窗口

1)、进行php服务管理器安装目录中的bin目录下 (我的为:D:wampmysqlbin) ,

操作为:

(1)、进入D盘 如: d: 回车;

(2)、进入bin目录 如: cd wampmysqlbin; 回车;

(3)、跳过权限检查启动MySQL 如: mysqld-nt --skip-grant-tables; 回车

(4)、此时,看到光标只能一闪一闪的,不能操作时,即为成功了一大步;

 

 

2)、另外再打开一个命令窗口:

操作为:

(1)、进行php服务管理器安装目录中的bin目录下 即:

进入D盘 如: d: 回车;

进入bin目录 如: cd wampmysqlbin; 回车;

(2)、进入use数据表,输入命令 如:use mysql 回车;

(3)、开始设置密码 如: update user set password=password("123456") where user="root"; 回车

(4)、进行所谓的刷新 如:flush privileges; 回车

(5)、退出 如: exit; 回车 ok;


注:(6)、当还没启动时,用绝招(打开任务管理器,结束进程 mysqld-nt.exe 再重新启动; 绝对 ok!)

 

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!