Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide information_schema database from phpmyadmin

Tags:

I am able to hide the database from writing this line

$cfg['Servers'][$i]['hide_db'] = 'information_schema';  

in config.inc.php file pf phpmyadmin.

It is possible to access content of this database through url like http://www.test.com/phpmyadmin/index.php?db=information_schema&token=3ba37ae1e41f6a10e4afc7c69b934bba

How is it possible to remove complete access of information_schema database ?

like image 885
Onkar Janwa Avatar asked Aug 22 '12 10:08

Onkar Janwa


People also ask

Can I delete Information_schema in MySQL?

Although you can query tables in the information_schema database, you cannot modify them. You also cannot delete the information_schema database.

What is Information_schema in phpMyAdmin?

INFORMATION_SCHEMA provides access to database metadata, information about the MySQL server such as the name of a database or table, the data type of a column, or access privileges. Other terms that are sometimes used for this information are data dictionary and system catalog.

Can we hide database in MySQL?

To revoke the SHOW DATABASES privilege, we can simply uncheck the box beside the SHOW DATABASES label, and click the Save button. There, we can set also database-specific privileges such as those to create views, show views, drop tables, execute INSERT statements, etc.

How do I show hidden files in phpMyAdmin?

Once a table is hidden, a light bulb or eye (depending on version) should appear next to the database name. Click on that, and it will bring up a dialog box with the hidden tables, allowing you to unhide (show) them.


1 Answers

Follow these steps:

  1. Open phpMyAdmin, authenticate yourself, if required
  2. Go to Settings > Features > Databases
  3. Put list of databases that you want to hide into Hide databases field, separating each entry with a pipe (|), i.e.: information_schema|performance_schema|mysql|phpmyadmin
  4. Click Apply button

As per KeshV's comments below, depending on your operating system (Linux, Windows etc.) and environment configuration you may need to have config.inc.php file writable in order to have above changes persistent between server or browser restarts.

However, on some configurations and in certain phpMyAdmin versions the above settings are stored directly in cookie and are preserved even though noting is added to config.inc.php file.

like image 172
Abhishek Goel Avatar answered Oct 11 '22 10:10

Abhishek Goel