Jhunter

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  0 Posts :: 1 Stories :: 5 Comments :: 0 Trackbacks

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

错误的原因更令人抓狂,那就是mysql server instance config wizard根本没有为你设密码,于是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 (cd 到Mysql的bin目录下)

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;
# Now you should see that u have 3 entries
+-----------------------------+
| user | host | password |
+-----------------------------+
| root | localhost | |
| root | 127.0.0.1 | |
| | localhost | |
+-----------------------------+

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跑一遍了。。。

posted on 2010-11-01 15:42 朱秀雀 阅读(2671) 评论(5)  编辑  收藏

Feedback

# re: Mysql安装1045错误解决 2011-04-05 22:12 fenggaie
您试验过这个说法吗?不行的东西哦,拿出来没意思哦!
  回复  更多评论
  

# re: Mysql安装1045错误解决 2011-06-10 16:40 爱爱爱
可以的,多谢  回复  更多评论
  

# re: Mysql安装1045错误解决[未登录] 2011-10-11 22:05 往事如风
多谢!  回复  更多评论
  

# re: Mysql安装1045错误解决[未登录] 2011-10-27 15:02 cj
搞定了,我是win7家庭版,重装mysql两天了,终于按此方法搞定了,谢谢牛人共享经验  回复  更多评论
  

# re: Mysql安装1045错误解决 2012-01-16 00:35 JacyJim
果然有效果,非常非常的感谢。  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: