Pages

Showing posts with label xampp. Show all posts
Showing posts with label xampp. Show all posts

Friday, March 19, 2010

XAMPP phpMyAdmin Error 1045 Access denied for user

Description of error: This appears when you click the phpMyAdmin link from xampp home page. The error looks like this:

The using password: NO means that xampp configuration has no password to database server stored in it. The error could also be: Access denied for user 'root'@'localhost' (using password: YES). This error means xampp has a password for the database server but it is incorrect.

Solution:

1. Go to C:\xampp\phpmyadmin then open the config.inc or config.inc.php file


2. In line 20 you will see this: $cfg['Servers'][$i]['user'] = 'root';
Make sure that the 'root' there is the user to access your own database server. If not, change the 'root' to your own user name.



3. In line 21 you will see this: $cfg['Servers'][$i]['password'] = '';
This means that your database server doesn't have password save in it. If your database server has a password, type the password between the single quotes for example 'mysql'.

However, if there is a password stored like this: $cfg['Servers'][$i]['password'] = 'mysql'; then you have to change 'mysql' into the password your database server is using for example 'developer_password'

4. Clear your cookies then reload localhost


Hope this helps, I tried it and it worked.