Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm getting the following error:

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

What is the problem?

share|improve this question
add comment

migrated from stackoverflow.com Oct 27 '09 at 4:54

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

5 Answers

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.

http://dev.mysql.com/doc/refman/4.1/en/passwords.html

hope it helps.

share|improve this answer
add comment

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
add comment

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
add comment

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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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