Databases Reference
In-Depth Information
We need to modify a local copy of the scripts/create_tables.sql file to populate
our database with all the needed tables. They will have the prefix pma_ to make them
easily recognizable. We need to remove the following lines:
CREATE DATABASE IF NOT EXISTS `phpmyadmin`
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
USE phpmyadmin;
This is done because we won't be using a phpmyadmin database but our own. Next,
we should open our own database in phpMyAdmin. We are now ready to execute
the script. There are two ways of doing this:
• As we already have the script in our editor, we can just copy the lines
and paste them in the query box of the SQL page. More details on this in
Chapter 11 .
• Another way is to use the import technique shown in Chapter 7 . We select the
create_tables.sql script that we just modified.
After the creation, the navigation panel shows us the special pma_ tables along with
our normal tables.
It is now time to adjust all the configuration storage related parameters in config.
inc.php . This can be done easily with the setup script as seen in this chapter, or by
pasting the appropriate lines from the config.sample.inc.php file. The database is
our own and the table names are the ones that have just been created:
$cfg['Servers'][$i]['pmadb'] = 'mydatabase';
$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]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
As table names are case sensitive, we must use the same names as
the tables created by the installation script. We are free to change the
table names (see the right-hand part of the configuration directives
listed) provided we change them accordingly in the database.
 
Search WWH ::




Custom Search