please create a new setting!

[expired user #6370]'s profile image [expired user #6370] posted 12 years ago in General Permalink
like PhpMyAdmin.

======================================
$cfg['Servers'][$i]['hide_db'] string
Regular expression for hiding some databases from unprivileged users. This only hides them from listing, but a user is still able to access them (using, for example, the SQL query area). To limit access, use the MySQL privilege system.

For example, to hide all databases starting with the letter "a", use

$cfg['Servers'][$i]['hide_db'] = '^a';

and to hide both "db1" and "db2" use

$cfg['Servers'][$i]['hide_db'] = '^(db1|db2)$';

More information on regular expressions can be found in the PCRE pattern syntax portion of the PHP reference manual.
======================================

for default tables set like
$cfg['Servers'][$i]['hide_db'] = '^(information_schema|mysql|phpmyadmin|performance_schema)$';


pls

jfalch's profile image jfalch posted 12 years ago Permalink
it is already possible to do this (sort of). in the file / session manager, there is a field "Databases" near the bottom; enter here a list of database names, separated by semicolons, that are to be shown to the user.

if you have admin rights on your server, you can use the tools / user manager for a more thorough exclusion: for each user to limit access for, add databases at the lower right, then set all their access flags to "off".
ansgar's profile image ansgar posted 12 years ago Permalink
Very right. No need for a fourth method to hide databases.

If you need to access such databases via SQL query, I see no goal of not having them in the tree.

Please login to leave a reply, or register at first.