Can you hide tables from 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 my privileges through MySQL by not allowing them to run statements such as DROP or ALTER. But is it possible to prevent some tables from being viewed in phpMyAdmin?

If you do not have the MySQL privilege that controls this (I would not have thought that it would be), does phpMyAdmin have a configuration that allows this?

I understand that one way to solve this problem is to move the tables to a new database, to which they are not added. This is not an option for my application.

+4
source share
3 answers

You can move the tables to another database, and then restrict the user account to only access database 1 using open tables. Trying to change phpmyadmin would be a huge mistake, the user could just write a user query to access the tables, this is a dead simple hack.

This should be done on the database side or there is absolutely no point. SE-Postgresql is the only project I know that allows you to use table permissions on tables. This is the only database that can do this because very few people need this feature.

0
source

Yes, you can hide a specific database in phpmyadmin.
To do this, simply open config.inc.php in your phpmyadmin directory in the root directory of the web server or where it is located. or find 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.

+8
source

phpMyAdmin connects to the database as a specific MySQL user. If this user does not have permissions on the table data, the phpMyAdmin user will not be able to access it. Of course, this will be available to all mypMyAdmin users.

0
source

Source: https://habr.com/ru/post/1303973/


All Articles