Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you hide tables from a MySQL user in phpMyAdmin?

I have a MySQL user added to a database that I would like to prevent from viewing certain tables.

I can limit their privileges through MySQL by preventing them from running statements like DROP or ALTER. But is it possible to prevent them from viewing certain tables in phpMyAdmin?

If there isn't a MySQL privilege that controls this (I wouldn't imagine there would be), is there a configuration in phpMyAdmin that allows this?

I understand one workaround here is to move the tables to a new database that they're not added to. This isn't an option for my application.

like image 576
ack Avatar asked Mar 12 '10 19:03

ack


1 Answers

Yes, you can hide a particular database in phpmyadmin.
In order to do that, just open config.inc.php in your phpmyadmin directory in your webserver root or where it is placed. or search for config.inc.php
if you want to hide information_schema and mysql add this line after:

$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['hide_db'] = '^information_schema|mysql$';

This is It.

like image 128
Rajat Chodhary Avatar answered Oct 08 '22 14:10

Rajat Chodhary