读书人

windows mysql提醒:1045 access denie

发布时间: 2012-10-31 14:37:31 作者: rapoo

windows mysql提示:1045 access denied for user'root'@'localhost' using password yes

http://blog.sina.com.cn/s/blog_521a28ba0100upwl.html
一大早打开Navicat Lite for MySQL客户端,提示1045 access denied for user ’root’@’localhost’ using password yes,太不给力了,网上搜了很多资料,最终问题得以解决,下面将详细的解决过程分享给大家,希望遇到同样问题的同胞,少走弯路:


??? 1、打开DOS进入mysql下bin目录:本人:C:\Program Files\MySQL\MySQL Server 5.1\bin
??? 2、停止mysql服务,net stop? mysql
??? 3、在C:\Program Files\MySQL\MySQL Server 5.1\bin后面输入:mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 5.1\my.ini" --console --skip-grant-tables
??? 具体操作如下图:



??? 4、重新打开一个DOS窗口,在C:\Program Files\MySQL\MySQL Server 5.1\bin后面输入:mysql -root? -p
??? 5、提示输入密码,在Enter后面输入密码,进入mysql>
??? 6、在mysql>下输入:
??? mysql>update ssh set password=PASSWORD('newpassword') where USER='root'
??? mysql>FLUSH PRIVILEGES;
??? mysql>quit
??? 其中,ssh为数据库名称,改为自己的即可,若有多个数据库可多次update操作即可。

??? 具体操作如下图所示:

windows mysql提醒:1045 access denied for user'root'@'localhost' using password yes

读书人网 >操作系统

热点推荐