Can't access phpMyAdmin because of host, username and password

everyone. When I try to access phpMyAdmin on Uniform Server I get the following error messages:

#1045 - Access denied for user 'root'@'localhost' (using password: YES)

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 funny thing is my username and password are both set to "root" and I have changed the IP address in the httpd.conf file to my Unique IP adddress, so I still don't know what the problem is.

Could somebody please help me out? Any help would be much appreciated.


Can you log in on the command prompt? (for instance: mysql -u root -p or even just mysql -u root)

Just to make sure you're aware, the root password for the mysql service and the root password for the device are going to be different. My hunch is that there's no password set on the 'root'@'localhost' MySQL account.

If one of the command line login methods above works, then run this in the mysql prompt and edit your question to include the output (remove the password hashes; we don't need to see them, we just need to know if they're there):

select User, Host, Password from mysql.user;

Try this:

Goto c:\wamp\apps\phpmyadmin3.3.9. Then edit the file named: config.inc.php

And in the following line, enter the password that you have setup previously:

$cfg['Servers'][$i]['password'] = '';

If your password is "123", then:

$cfg['Servers'][$i]['password'] = '123';

I hope it would work.

if it still not work change this too

from $cfg['Servers'][$i]['AllowNoPassword'] = true;

to$cfg['Servers'][$i]['AllowNoPassword'] = false;

(first part taken from akhileshbc answer)


Guys, I have been working on this 1045 issue for a week now and finally I have figured out:

You need to do it on command prompt when configuring your config.inc.php is not working.

Open up config.inc.php and empty the password field.

Follow the link below to see the instructions: http://www.configure-all.com/phpmyadmin.php