Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 and make sure that they correspond to the information given by the administrator of the MySQL server.
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/ 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
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 (simply put an invalid PHP statement in there and make sure that the page doesn't load at all)

Try setting the 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


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.