phpMyAdmin configuration storage settings

phpMyAdmin settings are stored in a MySQL database to retain them between browser sessions.  Setting up the storage requires minor updates to a MySQL database and the phpMyAdmin confic.inc.php file.


MySQL CREATE TABLE

While not required, if not on a Basic plan it would be best to add a new database to store the phpMyAdmin settings rather than storing them on an existing database.  And note if using phpMyAdmin to make the connection to the new database, you may need to (temporarily) change the server setting within the config.inc.php beforehand.

If there is some familiarity with MySQL queries, the CREATE TABLE query can be found within /phpMyAdmin/sql/create_tables.sql (open the file in a text editor).  However, the file includes a CREATE DATABASE command that has to be omitted.  To run the query by hand, copy the syntax starting on line 39 to the bottom of the file (line 355).  For reference, and readability, that would mean the first and last CREATE TABLE are

CREATE TABLE IF NOT EXISTS `pma__bookmark` (

---

CREATE TABLE IF NOT EXISTS `pma__export_templates` (

Alternatively, download and extract the updated create_tables.sql here:  create_tables.zip

Then IMPORT that file to the database or open it in a text editor and copy and paste the full syntax into a new query window.


config.php.inc

After the tables have been created, a number of lines have to be uncommented and four values have to be updated in the config.php.inc.  Look for the "phpMyAdmin configuration storage settings" section of the file, then uncomment all the "User" and "Storage" lines as in the example below, save for "controlport".  Because the database is using the default MySQL port, it's unnecessary to uncomment the line.

In addition to uncommenting the lines, from the example below, update the databaseServer, databaseUsername, databasePassword, and databaseName with the MySQL database where the above query was run to complete the update.

/**
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'databaseServer';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'databaseUsername';
$cfg['Servers'][$i]['controlpass'] = 'databasePassword';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'databaseName';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';