pmadb

From PmaWiki

Jump to: navigation, search

pmadb refers to the phpMyAdmin Linked Tables Infrastructure. It is a database that is used internally for additional features.

By default, the setting is left empty which means it is disabled. But all the example files use the default name phpmyadmin for the default name, or in older versions it used to be pmadb. Enabling this will gives you features like bookmarks, comments, SQL history, relations, PDF schema, and MIME transformation. 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 http://www.phpmyadmin.net/documentation/#linked-tables and http://www.phpmyadmin.net/documentation/#authentication_modes

Contents

[edit] Configuration

You will need to have a control user configured, if that controluser's name is not pma you will need to edit the script and change the GRANT statement to match your controluser name.

Several varieties of SQL script are located in your ./scripts/ directory for different MySQL versions. In the Debian packages, the scripts directory can be found as /usr/share/doc/phpmyadmin/scripts/ or /usr/share/doc/phpmyadmin/examples/. Windows users should pay special attention to FAQ 1.23.

[edit] MySQL version older than 4.1.2

(not supported by pma >= 3.0 any longer)

Use the file ./scripts/create_tables.sql.

[edit] MySQL version 4.1.2 or newer

Use the file ./scripts/create_tables_mysql_4_1_2+.sql.


Changed in phpMyAdmin 3.0.0 :

Use the file ./scripts/create_tables.sql.

[edit] Upgrades

If you already had this infrastructure and upgraded to MySQL 4.1.2 or later, please use ./scripts/upgrade_tables_mysql_4_1_2+.sql.

You can use your phpMyAdmin to create the tables for you (as you would import any SQL file). Please be aware that you may need special (administrator) privileges to create the database and tables, and that the script may need some tuning, depending on the database name.

After having imported the ./scripts/create_tables.sql file, you should specify the table names in your ./config.inc.php file. The directives used for that can be found on the configuration page.

Advertisement