Home > Database > Mysql Tutorial > body text

mysql数据库忘记root密码解决方法_MySQL

WBOY
Release: 2016-06-01 13:06:07
Original
976 people have browsed it
windows下:
Copy after login
1. 停止mysql服务
Copy after login
<img src="http://img.bitscn.com/upimg/allimg/c140719/1405K4I3Z620-24013.jpg" alt="">
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
2. 在DOS窗口下, 进入mysql安装目录的bin目录下, 跳过权限检测, 启动mysql:<pre class="brush:php;toolbar:false">mysqld -nt --skip-grant-tables
Copy after login
<img src="http://img.bitscn.com/upimg/allimg/c140719/1405K4I4343P-3bG.jpg" alt="">
Copy after login
<img src="http://img.bitscn.com/upimg/allimg/c140719/1405K4I4U940-45636.jpg" alt="">
Copy after login
3. 重新打开一个窗口,进入bin目录下,设置新的root密码.../bin>mysqladmin -u root  flush-privileges password "newpassword".../bin>mysqladmin -u root -p shutdown 提示你输入密码,输入newpassword进入数据库4. 停止mysql server,用正常模式启动mysql,然后用上面账号就可以登陆数据库库了。
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
Copy after login
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