#1045 - Access denied for user 'root'@'localhost'
Posted by: lkenney (---.nys.biz.rr.com)
Date: January 30, 2013 06:16PM

I am new to phpmyadmin and am trying to access it. It was installed with WAMP. I used the console to assign a password but when I try to access phpmyadmin I get the following message: "#1045 - Access denied for user 'root'@'localhost' (using password: NO) " I cannot seem to figure out how to set this up. Any help will be appreciated. Thanks.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost'
Posted by: RiggsFolly (---.as13285.net)
Date: January 30, 2013 08:11PM

Hi,

there is a file here
C:\wamp\apps\phpmyadmin3.x.y called config.inc.php

This config contains the password that should be used for the 'root' user by phpMyAdmin


Change it to look like this and when you run phpMyAdmin it will throw a Userid Password challenge and ask for your userid and password.

I have commented out the original code and added a new set to accomplish this.

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
/*
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
*/

$i++;

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['LogoutURL'] = 'http://localhost/';


/* End of servers configuration */

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost'
Posted by: lkenney (---.nys.biz.rr.com)
Date: January 30, 2013 08:45PM

Thanks Riggs. I inserted the new code but no success. I still get the same message. I even restarted all services then rebooted the computer all with no success.

In addition to the above message this has also been present since the start:

"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."

I don't know if this provides any further insight. I do appreciate the assistance.

Thanks again.

Options: ReplyQuote
Re: #1045 - Access denied for user 'root'@'localhost'
Posted by: lkenney (---.nys.biz.rr.com)
Date: January 30, 2013 09:23PM

THANKS. It is now working with a password request. I don't know why it didn't before but it does now. Thanks again.

Options: ReplyQuote


Sorry, only registered users may post in this forum.