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

My website is hosted in shared hosting service and is working fine with updated news stored in MySQL database. To manage the database of website, I install phpMyAdmin in a sub-folder with the same username and password used in website.

When I login to phpMyAdmin, I don't see my database. phpMyAdmin is showing "No databases" in left pane.

Is there any thing I need to configure in phpMyAdmin?

Edited: This is the settings in config.inc.php. I can login to phpMyAdmin successfully.

$cfg['Servers'][$i]['host'] = 'hostname';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'dbuser';
$cfg['Servers'][$i]['password'] = 'password';
share|improve this question

migrated from stackoverflow.com Nov 15 '11 at 22:16

This question came from our site for professional and enthusiast programmers.

    
How did you install phpMyAdmin? Was this via cPanel? –  CraigM Nov 15 '11 at 14:00
1  
phpmyadmin should be in your c-panel you don't need to u phpmyadmin –  Qchmqs Nov 15 '11 at 14:00
    
Usually your hosting provider provides support for phpmyadmin. Please check with them. You don't need to install separately. –  Sai Krishna Nov 15 '11 at 14:01
1  
From the top of my head: Your phpMyAdmin install probably needs to have higher privileged access to mysql than you gave with your user, maybe even db root. Usually, when you're on shared hostings, the hosting provider needs to take care of the phpMyAdmin install and give you partial access for your databases. –  markus Nov 15 '11 at 14:01
1  
Make sure you have configured the $cfg['Servers'][$i]['user'], $cfg['Servers'][$i]['password'] and $cfg['Servers'][$i]['auth_type'] in your phpMyAdmin config. Also check which permissions phpMyAdmin needs (SHOW DATABASES for example) and if they're applied to your db user. –  CodeCaster Nov 15 '11 at 14:02
show 1 more comment

4 Answers 4

I believe you would have to setup the config file

http://wiki.phpmyadmin.net/pma/Config

share|improve this answer
    
Yes. I've already setup in config.inc.php. I will update the settings in my question. –  Thein Hla Maw Nov 15 '11 at 14:33
add comment

The problem is that db user does not have "SHOW DATABASES" privilege. That's why no database is showing in phpMyAdmin.

I have to query "USE mydatabase" in SQL tab first. After that, I can see and manage my database.

Thank you very much all.

share|improve this answer
add comment

This may not help you but it might help someone else. Had installed EasyPHP wamp stack and could create a database in phpMyAdmin but it would not show up in the list of databases. I manually logged into mysql via the command line console and could see my database. Was banging my head against the wall on this one.

Turns out I named my database test1 and phpMyAdmin config file has a special line to ignore databases starting with test:

$cfg['Servers'][$i]['hide_db'] = '(mysql|information_schema|performance_schema|test|phpmyadmin)';

Even after seeing this line, I thought it was just blocking the exact name test. However adding another random database name such as computer instantly appeared in the phpMyAdmin list of databases so it seems it blocks anything starting with (or possibly containing) the word test.

So solution is to either edit the above config line or don't create databases with test in the name.

share|improve this answer
add comment

What you should do is to modify $cfg['Servers'][$i]['hide_db'] because it accepts regular expressions so be default there is:

$cfg['Servers'][$i]['hide_db']='(mysql|information_schema|performance_schema|test|phpmyadmin)';

You should change it into:

$cfg['Servers'][$i]['hide_db']='^(mysql|information_schema|performance_schema|test|phpmyadmin)$';

Now only exact databases will be hidden in phpMyAdmin not the ones that have those words in name.

Official documentation for hide_db can be found here: http://docs.phpmyadmin.net/en/latest/config.html?highlight=hide_db#cfg_Servers_hide_db but it's not very obvious it should be done and it's very strange it isn't done be default

share|improve this answer
add comment

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.