I did a brand new install of PHPMyAdmin and I managed to get it set up a while ago with a single non-admin user and a database.

I now want to add a new user and new database. So, I went to the command line and created the database, created sampleuser@localhost identified by 'password', and granted all privileges to that user to the new database.

When I go to PHPMyAdmin, however, I can't log in as sampleuser. I also tried to grant privilages to see the new database to my old user, and the database doesn't appear for my old user.

Is there something I need to do to get PHPMyAdmin to reflect the changes?

1 Answer 1


You have to configure PHPMyAdmin to connect to the MySQL database first. If you go to http://wiki.phpmyadmin.net/pma/Config you'll see that you need to add the following example to your config.inc.php file:

 $cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname
 $cfg['Servers'][$i]['port'] = ''; // MySQL port (leave blank for 3306)
 $cfg['Servers'][$i]['connect_type'] = 'tcp'; // If the MySQL hostname is a socket, then this needs to be set to socket instead of tcp
 $cfg['Servers'][$i]['user'] = 'u130247'; // MySQL username
 $cfg['Servers'][$i]['password'] = 'GCpNMDZJf9q47umx'; // MySQL database
 $cfg['Servers'][$i]['only_db'] = ''; // MySQL database name

You should have also configured the login and password to get into PHPMyAdmin already. If you haven't then see http://wiki.phpmyadmin.net/pma/Quick_Install

(The username and password are taken from the PHPMyAdmin documention so they're not mine or someone else login for their MySQL database.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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