I’ve installed MySql on my system, later I installed wampserver. And from wamp server I tried load the phpMyAdmin in the browser (http://localhost/phpmyadmin/).
But it has given the following error
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
The reason is, I had set a password to MySQL(say ‘root’), and the PhpMyAdmin is trying to connect to MySql without any password.
Now, How to set the mysql password to NO PASSWORD ( through mysql console after pressing ENTER key it should go to mysql prompt)
1. Go to mysql Command Line Client , You can open it from WampServer also. from MySQL console in MySQL folder
2. Give the current password (here its ‘root’)
3. and type
SET PASSWORD FOR ‘<user>’@'<hostname>’ = PASSWORD(”); // in parenthesis to single quotes without space
here it is
SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(”);
done. open the PhpMyAdmin again in the browser or restart wamp server if it doesn’t work.
Fantastic!! Solved my problems, thanks!