Databases Reference
In-Depth Information
To create the necessary structure matching our current version of phpMyAdmin,
a command file called
create_tables.sql
is available in the scripts subdirectory
of the phpMyAdmin installation directory. However, we should not blindly
execute it before understanding the possible choices: multi-user installation or
single-user installation.
Multi-User Installation
In this setup, we will have a distinct database (
pmadb
) to store the metadata tables,
and our control user will have specific rights to this database. Each user will enter his
or her login name and password, which will be used to access his or her databases.
However, whenever phpMyAdmin itself accesses
pmadb
to obtain some metadata, it
will use the control user's privileges.
We first ensure that the control user
pma
has been created as explained in Chapter 2,
and that its definition in
config.inc.php
is appropriate:
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'bingo';
Then we use the
scripts/create_tables.sql
file to create the
phpmyadmin
database, assign proper rights to user
pma
, and populate the database with all the
necessary tables. Before using this script, look in the
scripts
directory. There might
be other scripts available for different MySQL versions - for example, phpMyAdmin
2.6.0 has
scripts/create_tables_mysql_4_1_2+.sql
, which should be used
instead of
create_tables.sql
for MySQL version 4.1.2 and higher.
Be warned that this script will erase the
phpmyadmin
database, if it exists, destroying all metadata about relations.
A possible method to execute this script is to use the technique described in
Chapter 8 (
Importing Structure and Data
), using the
SQL
sub-page and the file
selector. For this to work, we must have the
create_tables.sql
script somewhere
on our workstation. After the creation, the left panel looks like this:
Search WWH ::
Custom Search