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

I am experiencing the following problem when trying to connect to the phpmyadmin site of my server:

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: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
Invalid hostname for server 1. Please review your configuration.

The problematic part is, that I do not get to enter a Password, though the phpmyadmin/config.inc.php has all values set to the default e.g. the $cfg['Servers'][$i]['connect_type'] is set to "cookie". It works, if I change the conenct_type to "http". And of course mysql itself works, too when accessed through the PHP scripts running on the server as well as when accessed through the shell.

I appreciate your help.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

When using the "cookie" authentication method and if you run phpmyadmin on a 64-bit machine the mcrypt extension is required, on a 32-bit machine it is recommended but not required.

share|improve this answer

First off, make sure that you are editing the correct config.inc.php (simply put an invalid PHP statement in there and make sure that the page doesn't load at all)

Try setting the config.inc.php back to these default settings:

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql';

Also, I always like to install the latest phpMyAdmin whenever I have to change anything on it. The software is frequently the target of attacks and new versions are released regularly.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.