Prerequisites

The phpMyAdmin configuration storage holds all metadata for the tracking mechanism. If we have implemented this storage a while ago (for a previous phpMyAdmin version, such as 3.1 or older), we can use scripts/create_tables.sql from the current phpMyAdmin version to upgrade the configuration storage with the missing tables (in our case, the pma_tracking table). The reason for this is that the script creates this table in a prudent way by using the CREATE TABLE IF NOT EXISTS `pma_tracking` statement, thus ensuring that it won't be created if the table is already present.

Note

In phpMyAdmin 3.3.3, the type of the data_sql column in pma_tracking was changed from TEXT to LONGTEXT in the create_tables.sql script. Therefore, it's important to make this change manually in our own pma_tracking table, if we ran this script prior to version 3.3.3.

Configuring a basic tracking mechanism

In config.inc.php, for a specific MySQL server's configuration, the $cfg['Servers'][$i]['tracking'] should contain the name of the tracking table; the suggested name is pma_tracking to match the default value inside scripts/create_tables.sql.

Note

If this directive is left blank, no tracking is possible on this server (we won't see any Tracking menu).

By default, tracking must be activated per table. If we prefer that the tracking mechanism be switched on automatically for all future tables and views, the $cfg['Servers'][$i]['tracking_version_auto_create'] can be set to TRUE. Please note that this is only for future tables and views—we still need to activate tracking for existing tables.

The advantage of using automatic creation is that we don't have to think about it; tracking is done from the birth of a table. An inconvenient side effect of this is that we don't have the possibility of choosing which statements will be tracked; these will be taken from the default list (refer to the Choosing the statements to be tracked section later in this chapter).

Other configuration directives will be discussed in the section that relates to them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.237.79