>  기사  >  데이터 베이스  >  mysql数据库忘记root密码解决方法_MySQL

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

WBOY
WBOY원래의
2016-06-01 13:06:07932검색
windows下:
1. 停止mysql服务
<img src="http://img.bitscn.com/upimg/allimg/c140719/1405K4I3Z620-24013.jpg" alt="">

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




    
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.