Configuration storage

From PmaWiki
Jump to: navigation, search

pmadb refers to the phpMyAdmin configuration storage, formerly called the Linked Tables Infrastructure. It is a database that is used internally by phpMyAdmin for additional features (such as bookmarking queries and change tracking).

The setting is left empty by default, meaning it is disabled. However, all of the example files use the name phpmyadmin for the default name; in older versions, it was pmadb. Enabling this setting will give you features like bookmarks, comments, SQL history, relations, PDF schema, and MIME transformations. Comments and relation view are implemented natively in the newer versions of MySQL, so phpMyAdmin will use the MySQL features when available. The tables used can be located in your own database, or in a central database for a multi-user installation where a control user would make changes to it.

You set $cfg['Servers'][$i]['pmadb'] in your ./config.inc.php. Don't forget to update ./scripts/create_tables.sql and run it to create the database in MySQL.

A controluser needs to be configured to use this feature, see the configuration section of this page for more information on creating the user and configuring phpMyAdmin properly.

For setting all this up, it is a very good idea to read the following pages:

[edit] Configuration

You need to have created a control user. That username can be whatever you chose, but is called pma in the documentation. When creating the control user, GRANT them permissions on the database name you'll be using (the default is phpmyadmin).

Next, create the actual table structure. Execute the file create_tables.sql, found in the examples/ folder of your phpMyAdmin installation. The easiest way is to use phpMyadmin; click the Import button on the main page, and import the .sql file. If you really need to change the name of the database, edit the file first; you'll also need to use that database name instead of phpmyadmin later.

The final step is to configure config.inc.php. You need to set the control user and password, database name, and the table name for each server you've created. Details on each value can be found in Config#pmadb and continuing to read down until "verbose_check". Log completely out and back in to see the changes.

In the Debian packages, the scripts directory can be found as /usr/share/doc/phpmyadmin/scripts/ or /usr/share/doc/phpmyadmin/examples/.

Note: Windows users should pay special attention to FAQ 1.23.

[edit] Upgrades

For all phpMyAdmin versions after 3.0.0, simply re-run the examples/create_tables.sql file -- doing so will not overwrite existing data, but will create any new tables.

Additionally, if you already had this infrastructure from prior to MySQL 4.1.2, please use ./scripts/upgrade_tables_mysql_4_1_2+.sql to update the tables to take advantage of new MySQL features found beginning in 4.1.2.

[edit] phpMyAdmin/MySQL versions

For those running phpMyAdmin older than 3.0 or MySQL older than 4.1.2, special consideration is needed.

  • MySQL version older than 4.1.2: Use the file ./scripts/create_tables.sql.
    • Note: Versions of MySQL older than 4.1.2 are no longer supported by phpMyAdmin version 3.0 and higher.
  • MySQL version 4.1.2 or newer, phpMyAdmin older than 3.0: Use the file ./scripts/create_tables_mysql_4_1_2+.sql.

If you have a newer version of phpMyAdmin that does not have a scripts folder, you will find the file under the examples folder.

Personal tools