Home / Configuration options to fix some phpMyAdmin annoyances

Configuration options to fix some phpMyAdmin annoyances

I use phpMyAdmin as a PHP web based manager for MySQL, but find a few of the default configuration options "out of the box" a little annoying. This post shows some useful modifications to the defaults to make phpMyAdmin more usable, in my opinion.

The phpMyAdmin configuration file

The phpMyAdmin configuration file referred to in this post is in the root level of your installation of phpMyAdmin, and is called config.inc.php. If this file isn’t present, simply copy the sample file, config.sample.inc.php, as config.inc.php.

Edit this file, and reload the browser window each time you make a change to the config.

Maximum databases displayed per page

There is a configuration option to show a maximum number of databases in the left frame and in the database drop down list, which defaults to 100. I find this a little annoying on a server I manage which has about 220 databases having to page through the database list all the time.

Add the following option to the config file, setting the number to a sufficiently high value:

$cfg['MaxDbList'] = 1000;

Unfortunately setting it to zero doesn’t work; it literally won’t show any databases!

Maximum tables displayed per page

This is similar to the maximum number of databases; it shows a maximum number of tables in the databases table lists, and defaults to 250. Again, I find this annoying having to page if a database has a lot of tables in it.

Add the following option to the config file, setting the number to a sufficiently high value:

$cfg['MaxTableList'] = 1000;

Setting this one to zero does work (i.e. it will show all tables), but it leaves a paging drop down box above and below the tables list with 1 selected and another option of 0. To get rid of that, set the value to a large enough value as shown above.

Left frame database separator

The left frame database separator by default removes common prefixes from database names and nests them under the prefix. The prefix is delimited by the underscore character, so if you had databases named e.g. aa_1, aa_2, aa_3 etc, it would show them like this:

aa
_1
_2
_3

I’m not really a fan of this (and the database server with the 220 databases on it has all but about 10 of them with a common prefix) so to disable this behaviour, add this config option:

$cfg['LeftFrameDBSeparator']  = '';

Recent table list in the left frame

This is a new option as of phpMyAdmin 3.5.0 to show a drop down box near the top of the left frame with a list of recently used tables. I don’t really need this and it takes up unecessary room. To remove it, set the config option to zero like so:

$cfg['LeftRecentTable'] = 0;

Any others?

There are plenty of other configuration options for phpMyAdmin, which are well documented here in the manual. Are there any other annoying defaults that you change on a fresh install? Let me know in the comments.