Home >Database >Mysql Tutorial >忘记mysql数据密码,如何重设_MySQL

忘记mysql数据密码,如何重设_MySQL

WBOY
WBOYOriginal
2016-06-01 13:10:39894browse

1.停止mysql服务

2.转至mysql安装目录的 bin 目录下

3.运行 mysqld --skip-grant-tables

4.新开cmd窗口,直接输入 mysql 然后不输入密码回车.

5.use mysql;

6.更新密码 update user set password=password("newpwd") where user="root";

7.flush privileges; 刷新

试下新密码登录吧

Statement:
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