Take the 2-minute tour ×

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.
MySQL said: Documentation
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
add comment

2 Answers

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
add comment

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:


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
add comment

Your Answer


