Home > Database > Mysql Tutorial > body text

Windows环境下重置mysql密码操作命令_MySQL

WBOY
Release: 2016-06-01 13:24:03
Original
1028 people have browsed it

bitsCN.com 本地环境:Windows XP系统、xampp集成环境。
xampp安装目录:d:/xampp

1、首先停止正在运行的MySQL进程

>net stop mysql

如未加载为服务,可直接在进程管理器或者服务中进行关闭。

2、以安全模式启动MySQL
进入mysql目录在命令行下运行

>d:
>cd xampp/mysql/bin
>mysqld.exe --skip-grant-tables


3、完成以后就可以不用密码进入MySQL了

>mysql -u root -p

提示输入密码时直接回车即可。

4、更改密码

>use mysql
>update user set Password=password('新密码') where User='root';
>flush privileges;


5、启动MySQL服务
在任务管理器里关闭所有MySQL的进程,使用下面的命令启动。

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