Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

pcmanager1717

IS-IT--Management
Dec 12, 2003
3
CA
OK, im trying to set up PHPmyAdmin, with MySQL on RedHat 9, and I am getting this error when I go to the index page to set things up ..

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.

Error

MySQL said:

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

But the thing is , i can go to the command line , and login as root, no problems , its just everytime I try to access MySQL through a webpage on my server . .i get this same aceess denied error for root@localhost

please help !!
thanks
 
yes, I require a password to login to mysql with root.
from the command line I can do ./mysql -uroot -p <password>
and login just fine .
its just on web-based php pages , on my web server that give me this error .
 
Let me quote your first post...


phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.


You should go to your config.inc.php and check the following lines (for each MySQL server)
Code:
$cfg['Servers'][$i]['auth_type']     = 'config';
$cfg['Servers'][$i]['user']          = 'root';
$cfg['Servers'][$i]['password']      = '';

You need to enter whichever user you'd like phpMyAdmin to run as in the user field. The auth type can be config, http, or cookie based... if you don't care at all about security you can enter a password right there too, and you'll never be prompted.

There are other methods, HTTP and COOKIE... but config is what I know.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top