Mobile app version of vmapp.org
Login or Join
Cofer257

: Trouble creating new MySQL user/database with PHPMyAdmin 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

@Cofer257

Posted in: #Database #Mysql #Phpmyadmin

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gretchen104

You have to configure PHPMyAdmin to connect to the MySQL database first. If you go to 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 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.)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme