mysql 报1045 就是密码设置了还是可以直接登入

1 、停止mysql5服务:
 
net stop mysql5
 
2、开一个DOS窗口执行:(启动mysql,关闭权限的检查)
 
c:\mysql\bin>mysqld-nt --skip-grant-tables &
 
3、再开一个DOS窗口执行:
 
c:\mysql\bin>mysql mysql
 
> update user set password = password('123456') where user = 'root'; 
 
 
root密码即为设置为123456!

  

猜你喜欢

转载自www.cnblogs.com/dazhulin/p/10406393.html