MySQL Forums
Forum List  »  PHP

Re: phpMyAdmin - #1045 - Access denied for user 'pmausr'@'localhost' (using password: YES).
Posted by: Paul Simpson
Date: February 09, 2009 05:35PM

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

Look in the phpmyadmin folder for this file:

Open the file with any web editor so you can view the file in HTML mode.

Look for the following lines of code below. Usually the problem is that the line of code that holds the password — has no password entered. In the forth line of code below, enter the password (between the single quotes) that you gave when you installed MySQL. The “User Name” defaults to 'root' — as shown in the error message above. If the error message has something other than: 'root'@'localhost', leave the third line of code below as is, otherwise, replace the value 'root' with what ever value is between the single quotes in the error message that comes before the @ symbol.

This will correct the error and phpMyAdmin should now connect to MySQL. However, you may also encounter another error message when phpMyAdmin loads. This is caused by one or both of the last two lines of code below containing a value; in this case, the seconded line from the bottom contained the value: 'pma'. The third line of code from the bottom is the original line of code; I commented it out by adding the two slashes at the beginning of the line — just in case I forgot what value it originally contained if it needed to be changed back later.

Save the file and close the page. phpMyAdmin should now load without any errors occurring.

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '123456789';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;

/* User for advanced features */
// Original Line of Code: $cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controluser'] = '';
$cfg['Servers'][$i]['controlpass'] = '';

Options: ReplyQuote

Written By
October 17, 2006 11:45PM
October 18, 2006 09:46AM
November 14, 2006 01:38PM
Re: phpMyAdmin - #1045 - Access denied for user 'pmausr'@'localhost' (using password: YES).
February 09, 2009 05:35PM

Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.