Mobile app version of vmapp.org
Login or Join
Lengel546

: No databases showing in phpMyAdmin 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

@Lengel546

Posted in: #Mysql #Php #Phpmyadmin

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';

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Lengel546

3 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

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: 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

10% popularity Vote Up Vote Down


 

@Murphy175

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.

10% popularity Vote Up Vote Down


 

@Gail5422790

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme