When your database names follow patterns like test_db1
and test_db2
, phpMyAdmin automatically creates collapsible groups (in this case named "test") in the left navigation panel. While this feature aims to organize related databases, many developers find it counterproductive for:
- Quick database switching during development
- Systems with many similarly-prefixed databases
- When precise database names are crucial
The most permanent solution involves modifying phpMyAdmin's configuration file. Locate your config.inc.php
(typically in the phpMyAdmin installation directory) and add:
// Disable database grouping
$cfg['NavigationTreeDbSeparator'] = '';
For temporary changes (useful in shared environments), append this parameter to your URL when accessing phpMyAdmin:
http://your-server/phpmyadmin?server=1&db=&table=&separator=
Developers often encounter these issues during implementation:
- Forgetting to restart the web server after config changes
- Not clearing browser cache (grouping may persist visually)
- Overlooking multiple configuration files in different locations
After making changes, verify the solution worked by:
- Refreshing phpMyAdmin completely (Ctrl+F5)
- Checking that all databases appear at the root level
- Confirming no grouping symbols appear between database names
When working with multiple databases that share common naming prefixes (e.g., test_db1
, test_db2
), phpMyAdmin automatically groups them under a collapsible parent node in the left sidebar (e.g., "test" group). While this feature helps organize large database collections, some administrators prefer a flat database list view.
The solution involves editing phpMyAdmin's configuration file (config.inc.php
):
// Disable database grouping
$cfg['NavigationTreeDbSeparator'] = '';
For older phpMyAdmin versions (pre-4.0), you might need to use:
// Alternative approach for legacy versions
$cfg['Servers'][$i]['hide_db'] = '';
If managing multiple servers with different grouping preferences:
// Apply to specific server only
$cfg['Servers'][1]['NavigationTreeDbSeparator'] = '';
$cfg['Servers'][2]['NavigationTreeDbSeparator'] = '_'; // Keep grouping for this server
For more granular control over grouping behavior:
// Only group databases matching specific patterns
$cfg['NavigationTreeDbSeparator'] = '(?:(^|[^0-9]))(?=[0-9])';
After making changes:
- Clear your browser cache
- Restart your web server if changes don't appear immediately
- Check phpMyAdmin error logs if the interface breaks
For Docker deployments, ensure you're modifying the correct config file as containers may have ephemeral filesystems.