Permanent configuration for a single database in PMA

GoWilkes

Well-Known Member
Sep 26, 2006
645
28
178
cPanel Access Level
Root Administrator
I've been trying to figure out how to customize my PMA configuration (for a specific user, not necessarily everyone) forever, but the docs make no sense at all to me. At this point I'm led to find config.inc.php... great, but where is it?

I'm using CentOS 7 and PMA 4.9.7, and the docs say it should be at /etc/phpMyAdmin. But this directory doesn't exist :-/

Do I need to create the directory AND file?

To do it for a single user, does the file name need to be config.[my_username].inc.php ?

Based on the docs, I think that I can just take the JSON file that I import for configuration settings and add it to the PHP file, like so:

Code:
# this is in the JSON
{
    "PmaNoRelation_DisableWarning": true,
    "Console\/Mode": "collapse",
    [yada yada yada],
    "Server\/hide_db": ""
}

# so change it to this in the PHP
<?php

$cfg["PmaNoRelation_DisableWarning"] = true;
$cfg["Console"]["Mode"] = "collapse";

[yada yada yada]

$cfg["Server"]["hide_db"]: "";

?>
Is that right?
 

ankeshanand

Well-Known Member
Mar 29, 2021
202
60
103
India
cPanel Access Level
Root Administrator
Location for PMA in cPanel/WHM: /usr/local/cpanel/base/3rdparty/phpMyAdmin/
Code:
cd /usr/local/cpanel/base/3rdparty/phpMyAdmin/
From what you've written in the JSON File, It seems like you are trying to hide Databases from that Particular User. To do so, You can Go to User Groups in PMA, Create a New group and assign it to that Particular User. You can also Check User Management from here
 

GoWilkes

Well-Known Member
Sep 26, 2006
645
28
178
cPanel Access Level
Root Administrator
Thanks, I found it :) Can I only make changes to config.inc.php here, or do I create config.[my_username].inc.php for user-specific settings?

The variables that I posted before are just a sample, though. I had gone through the PMA configuration last year and made several changes (mainly to speed up my regular workflow and make it easier to keep PMA open in a small window), so I actually have 22 settings in the JSON file.