Skip to content
Advertisement

MySQL not showing databases created in phpMyAdmin

I’m trying to build a database for my server in phpmyadmin but when I finish building it I can’t access it using PHP and it won’t show when I list the databases in MySQL. But when I create a database in mySql it shows up in phpmyadmin. Also I’m running phpmyadmin version 4.0.3, and theres a statement at the bottom of the page saying The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.

Thanks!

Advertisement

Answer

This sounds like a permissions issue. I’d guess that your phpMyAdmin is connecting to MySQL as root (or another user with the superuser privilege) and can therefore see all databases. Your app is probably connected using a different, lower privileged user.

Try running select user(); from your app and from phpMyAdmin and you will know for sure.

Assuming your app is running with a different user, you will need to add privilages for it to access the database you create. Please read the section titled Assigning privileges to user for a specific database in the phpMyAdmin documentation.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement