Windows_系统MYSQL报1045错误

本文介绍了一种常见的Windows系统下MySQL登录错误1045的解决方案,该错误通常由于未设置root密码引起。文章提供了详细的步骤指导用户如何重置密码并更新MySQL用户表。


该错误只在windows系统上出现,据说这个错误已经存在n年了,有人extremely dispointed that it still exists here in 2009!

错误的原因就是mysql server instance config wizard根本没有为你设密码,于是root密码是空

(也许你把密码弄错了,可以使用root用户与安装时设置的密码登录尝试)

解决办法:
I clicked Skip on the dialog that states the Error 1045...Then cancelled the "MySQL Server Instance Config Wizard"Now...

Open a command prompt type "mysql -u root -p" then hit enter again when it requests a password.You should now have access to the mysql monitor...type the following at the prompts...

mysql>use mysql
mysql>select user, host, password from user;
mysql> delete from user where host="localhost" and user="";
mysql> update user set password=password("xxxx") where user="root";
mysql> flush tables;
mysql> flush privileges;
mysql> quit
Now the mysql table should be updated and everything fixed.Try it out...

然后就可以用config wizard跑一遍了。。。


原文http://wenku.baidu.com/link?url=g-s4f45cb5z5ve0KI8bE6Dq9RVPH0HzqGgcgeA8MDmVx3jQemIfY-HHJq5oFjgjE_YqWfNOEg2InUUfrH43LvJ8eTMyBQt15ARh-Jfkcu_e


有所改动

找准问题所在才是最重要的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值