wamp mysql改完密码之后不能访问,在WAMP中更改MySQL根密码后无法连接

This is one of the most common problems found with WAMPSERVER. I ran through this problem too and posted my solution under the same title here . But after getting no appropriate reply/solution I had to dump Wampserver and install XAMPP instead . It works smoothly (For solution to the problem Scroll down and look under UPDATE section or you can read what my problem was exactly before you run into a quicky )

Here are the details :

Okay ,I am using WAMP and changed mysql password from phpMyAdmin interface of all the root accounts.

Now after that i when i tried to access localhost/phpmyadmin - The access was denied and the interface is not ready to show up .

Here is the Error

#2000 - mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file.

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

Then afterwards i tried using the method given in Reference manual for resetting the password by creating that init.txt file (Hope you all know what i am reffering to here . If not just try this link)

Then following all the instructions clearly the CMD in its output shows some following negative statements:

Invalid password found for "Edited_root_username" @localhost

Note: the rootusername that CMD shows is the one that i changed through phpMyAdmin interface. the previous one was of course - root.

And some other catching statement in cmd was:

please check yor mysql manual for correct syntax near `FLUSH PRIVELEGES.

Can't figure out where the problem is ???

[Update]

Okay , the problem will not be solved until you reintsall the WAMPSERVER . But if you want to change your ROOT password for the new installation by following the instructions given in the mysql manual , Please don't bother .It is a total waste of time . After following the procedure in mysql manual there are same errors in command prompt as i mentioned above . Yes , this time you do have access to PHPMYADMIN (due to reinstallation) but as soon you execute the mysql init.txt file , PHPMYADMIN says you have no database privileges (seems WAMP is not ready to give up--anyways screw this and have a look at solution below)

Solution:

Back up the data you have under mysql->data folder and Instead of reinstalling Wamp install XAMPP .

The procedure laid down in XAMPP password change help page for changing root password really works like a charm (check the FaQ link for quick access ->to this question).

And yes place the earlier data you copied from mysql->data folder in WAMP in the same folder DATA folder under mysql in your new XAMPP Installation .

IT WORKED FOR ME and I am having access to almost all databases i created earlier in wamp

NOTE---Some of the tables might not show up if their .FRM files are not having corresponding.MYDand.MYIextension files .But important ones did showed up for me :).

解决方案

Open a MySQL console (taskbar > wamp > MySQL > MySQL console )

type: SET PASSWORD = PASSWORD('your_current_password')

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值