Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm getting the following error:

#1045 - Access denied for user: 'root'@'localhost' (Using password: Yes)

What is the problem?

share|improve this question

migrated from Oct 27 '09 at 4:54

This question came from our site for professional and enthusiast programmers.

Just in case, please ensure a few things:

  1. You are connecting from the localhost. Both phpmyadmin and mysql need to be running on the same server. If they are on different servers, the localhost connection will not work.
  2. You have supplied the correct passwords for the root user.
share|improve this answer

It really does look like you don't have the correct password for the root account but as a first step I recommend you stop using the root account. Instead, create a new account, giving it only the permissions it actually requires, and use that account for phpMyAdmin, making sure you enter the user name and password correctly.

share|improve this answer

Cant be sure what the exact problem is with just that, you should provide more info.

So the is nothing more than general help.

The error is caused by a mistaken password for root, have you set it? are you sure it is correct?

If the is a local system or you are the admin, try the link and reset the password for mysql.

hope it helps.

share|improve this answer

We had this problem specifically with MySQL 5 and phpMyAdmin on RedHat. If I recall, it was due to an older mysqllib on the phpMyAdmin box. We worked around this issue by setting the MySQL passwords on users who where accessing the database through phpMyAdmin using OLD_PASSWORD() instead of PASSWORD

use mysql;
update USER set password=old_password('password') where user=user;
flush privileges;
share|improve this answer

check for a file called in phpMyAdmin folder and add the password for the database as well as the user name if u changed it

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.