Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question

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.)

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.