Hide the information schema in phpMyAdmin
Posted October 11th, 2008 in MySql and PHP
When you log into phpMyAdmin you can only see the databases for which you have access rights, as well as the information_schema database. It is possible to hide this database if you want to. This post looks at how to hide the information_schema database in phpMyAdmin.
phpMyAdmin's config.inc.php file has a lot of available settings and one of these is ['hide_db'] which can be specified on a server by server configuration.
Normally you would have something like this in your config.inc.php file:
/* * First server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; /* Select mysqli if your server has it */ $cfg['Servers'][$i]['extension'] = 'mysql'; /* User for advanced features */ $cfg['Servers'][$i]['controluser'] = ''; $cfg['Servers'][$i]['controlpass'] = '';
It's then just a matter of adding this line underneath the above section:
$cfg['Servers'][$i]['hide_db'] = 'information_schema';
and the information_schema will no longer show.
If you have your phpMyAdmin configuration set up to be able to log into multiple servers you would then need to add that setting to each of the other server's settings as well.
Related posts:
- Hide selected databases in phpMyAdmin (Tuesday, October 21st 2008)
- phpMyAdmin (Wednesday, December 10th 2003)
Recent posts:
- List installed packages with YUM (Tuesday, December 2nd 2008)
- Monthly Roundup - November 2008 (Monday, December 1st 2008)
- Weekly Roundup - December 1st 2008 (Monday, December 1st 2008)
- Installing subversion on CentOS (Sunday, November 30th 2008)
- GoDaddy 99 cent .com domain coupon code (Saturday, November 29th 2008)
- Find the index of a string within a string with Javascript (Friday, November 28th 2008)
Subscribe to RSS Feed / Email / Bookmark / Share
Use the buttons below to subscribe to my RSS feed to be notified next time something is posted, share this post with others, or subscribe by email and have my posts sent in a daily email.
