now 2 scripts to create tables for the infrastructure
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2004-07-23 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* Documentation.html: take into account the new script to
|
||||
create tables for the infrastructure
|
||||
|
||||
2004-07-23 Alexander M. Turek <me@derrabus.de>
|
||||
* config.inc.php, libraries/config_import.lib.php,
|
||||
libraries/select_lang.lib.php: Made phpMyAdmin aware that there is a
|
||||
|
@@ -165,18 +165,32 @@
|
||||
in your browser. phpMyAdmin should now display a welcome screen
|
||||
and your databases, or a login dialog if using HTTP or cookie
|
||||
authentication mode.</li>
|
||||
<li> For a whole set of new features (bookmarks, comments, SQL-history, PDF-generation, field contents transformation, etc.)
|
||||
you need to create a set of tables in your database. Please look at your scripts/
|
||||
</ol>
|
||||
<a name="linked-tables"></a>
|
||||
<h3>Linked-tables infrastructure</h3>
|
||||
<p>
|
||||
For a whole set of new features (bookmarks, comments, SQL-history,
|
||||
PDF-generation, field contents transformation, etc.)
|
||||
you need to create a set of special tables. Those tables can be located
|
||||
in your own database, or in a central database for a multi-user
|
||||
installation (this database would then be accessed by the controluser,
|
||||
so no other user should have rights to it).
|
||||
<br /> <br />
|
||||
Please look at your scripts/
|
||||
directory, where you should find a file called <i>create_tables.sql</i>.
|
||||
(If you are using a Windows server, pay special attention to <a href="#faq1_23">FAQ 1.23</a>).
|
||||
If your MySQL server's version is 4.1.2 or later, please use <i>create_tables_mysql_4_1_2+.sql</i> instead.
|
||||
You can already use your phpMyAdmin to create the tables for you. Please be
|
||||
aware that you may have to have special (administrator) privileges to create
|
||||
the database and tables. After having imported the <i>create_tables.sql</i> file,
|
||||
you should specify the table names in your <i>config.inc.php</i> file. The directives
|
||||
used for that can be found in the <a href="#config">Configuration section</a>.</li>
|
||||
|
||||
</ol>
|
||||
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.
|
||||
<br /> <br />
|
||||
After having imported the <i>create_tables.sql</i> file,
|
||||
you should specify the table names in your <i>config.inc.php</i> file. The directives
|
||||
used for that can be found in the <a href="#config">Configuration section</a>.
|
||||
You will also need to have a controluser with the proper rights to
|
||||
those tables (see section <i>Using authentication modes</i> below).</li>
|
||||
</p>
|
||||
|
||||
<h3>Upgrading from an older version</h3>
|
||||
<ul>
|
||||
@@ -589,45 +603,19 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
<b>$cfg['Servers'][$i]['pmadb']</b> string
|
||||
</dt>
|
||||
<dd>
|
||||
Starting with version 2.3.0 phpMyAdmin offers a lot of features
|
||||
to work with master / foreign - tables. To use those as well as
|
||||
the bookmark feature you need special tables with a
|
||||
predefined structure, which we explain below.
|
||||
The name of the database containing the linked-tables infrastructure.
|
||||
<br /><br />
|
||||
See the <a href="#setup">Quick Install section</a> in this document for a quick way
|
||||
of creating those tables. Also, if you are using a Windows server,
|
||||
read <a href="#faq1_23">FAQ 1.23</a>.
|
||||
See the <a href="#linked-tables">Linked-tables infrastructure</a>
|
||||
section in this document to see the benefits of this infrastructure,
|
||||
and for a quick way of creating this database and the needed tables.
|
||||
<br /><br />
|
||||
If you are the only user of this phpMyAdmin installation, you can
|
||||
use your current database to store those special tables; in this
|
||||
case, just put your current database name in
|
||||
<tt>$cfg['Servers'][$i]['pmadb']</tt>.
|
||||
<tt>$cfg['Servers'][$i]['pmadb']</tt>. For a multi-user installation,
|
||||
set this parameter to the name of your central database containing
|
||||
the linked-tables infrastructure.
|
||||
<br /><br />
|
||||
If you are setting up a multi-user phpMyAdmin installation,
|
||||
you will need to create a new database and setup special privileges,
|
||||
so, as superuser:
|
||||
<br /><br />
|
||||
<ul>
|
||||
<li>
|
||||
create a new database for phpMyAdmin:<br />
|
||||
<tt> CREATE DATABASE phpmyadmin;</tt><br />
|
||||
If using MySQL 4.1.2 or later, use instead:<br />
|
||||
<tt> CREATE DATABASE phpmyadmin DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;</tt><br />
|
||||
Note that "controluser" must have
|
||||
<tt>SELECT, INSERT, UPDATE</tt> and <tt>DELETE</tt>
|
||||
privileges on this database. Here is a query to set up
|
||||
those privileges (using "phpmyadmin"
|
||||
as the database name, and "pma" as the
|
||||
controluser):<br />
|
||||
<tt>
|
||||
GRANT SELECT,INSERT,UPDATE,DELETE ON phpmyadmin.* to 'pma'@'localhost';
|
||||
</tt><br />
|
||||
do <b>not</b> give any other user rights on this database.
|
||||
</li>
|
||||
<li>
|
||||
enter the database name in <tt>$cfg['Servers'][$i]['pmadb']</tt>
|
||||
</li>
|
||||
</ul><br />
|
||||
</dd>
|
||||
|
||||
<dt>
|
||||
@@ -638,22 +626,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
Since release 2.2.0 phpMyAdmin allows to bookmark queries. This can be
|
||||
useful for queries you often run.<br /><br />
|
||||
|
||||
To allow the usage of this functionality you have to:
|
||||
To allow the usage of this functionality:
|
||||
<ul>
|
||||
<li>set up "pmadb" as described above</li>
|
||||
<li>within this database create a table following this scheme:
|
||||
<br />
|
||||
<tt>
|
||||
CREATE TABLE `pma_bookmark` (<br />
|
||||
id int(11) DEFAULT '0' NOT NULL auto_increment,<br />
|
||||
dbase varchar(255) NOT NULL,<br />
|
||||
user varchar(255) NOT NULL,<br />
|
||||
label varchar(255) NOT NULL,<br />
|
||||
query text NOT NULL,<br />
|
||||
PRIMARY KEY (id)<br />
|
||||
) TYPE=MyISAM COMMENT='Bookmarks';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
|
||||
<li>enter the table name in
|
||||
<tt>$cfg['Servers'][$i]['bookmarktable']</tt></li>
|
||||
</ul><br />
|
||||
@@ -701,25 +676,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
The keys can be numeric or character.
|
||||
<br /><br />
|
||||
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
To allow the usage of this functionality:
|
||||
<ul>
|
||||
<li>set up "pmadb" as described above</li>
|
||||
<li>
|
||||
within this database create a table following this scheme:
|
||||
<br />
|
||||
<tt>
|
||||
CREATE TABLE `pma_relation` (<br />
|
||||
`master_db` varchar(64) NOT NULL default '',<br />
|
||||
`master_table` varchar(64) NOT NULL default '',<br />
|
||||
`master_field` varchar(64) NOT NULL default '',<br />
|
||||
`foreign_db` varchar(64) NOT NULL default '',<br />
|
||||
`foreign_table` varchar(64) NOT NULL default '',<br />
|
||||
`foreign_field` varchar(64) NOT NULL default '',<br />
|
||||
PRIMARY KEY (`master_db`, `master_table`, `master_field`),<br />
|
||||
KEY foreign_field (foreign_db, foreign_table)<br />
|
||||
) TYPE=MyISAM COMMENT='Relation table';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
|
||||
<li>
|
||||
put the relation table name in
|
||||
<tt>$cfg['Servers'][$i]['relation']</tt>
|
||||
@@ -746,20 +705,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
<br />
|
||||
This configuration variable will hold the name of this special
|
||||
table.
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
To allow the usage of this functionality:
|
||||
<ul>
|
||||
<li>set up "pmadb" as described above</li>
|
||||
<li>within this database create a table following this scheme:
|
||||
<br />
|
||||
<tt>
|
||||
CREATE TABLE `pma_table_info` (<br />
|
||||
`db_name` varchar(64) NOT NULL default '',<br />
|
||||
`table_name` varchar(64) NOT NULL default '',<br />
|
||||
`display_field` varchar(64) NOT NULL default '',<br />
|
||||
PRIMARY KEY (`db_name`, `table_name`)<br />
|
||||
) TYPE=MyISAM COMMENT='Table information for phpMyAdmin';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
|
||||
<li>
|
||||
put the table name in
|
||||
<tt>$cfg['Servers'][$i]['table_info']</tt>
|
||||
@@ -785,43 +733,14 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
pages) and "table_coords" (storing coordinates where each
|
||||
table will be placed on a PDF schema output).
|
||||
<br /><br />
|
||||
You must be using the "relation" feature and have a table of
|
||||
PDF pages (see <tt><a href="#table_coords">$cfg['Servers'][$i]['pdf_pages']</a></tt>) to create PDF
|
||||
output.
|
||||
You must be using the "relation" feature.
|
||||
<br /><br />
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
To allow the usage of this functionality:
|
||||
<ul>
|
||||
<li>set up "pmadb" as described above</li>
|
||||
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
|
||||
<li>
|
||||
within this database create a table following this scheme:
|
||||
<br />
|
||||
<tt>
|
||||
CREATE TABLE `pma_table_coords` (<br />
|
||||
`db_name` varchar(64) NOT NULL default '',<br />
|
||||
`table_name` varchar(64) NOT NULL default '',<br />
|
||||
`pdf_page_number` int NOT NULL default '0',<br />
|
||||
`x` float unsigned NOT NULL default '0',<br />
|
||||
`y` float unsigned NOT NULL default '0',<br />
|
||||
PRIMARY KEY (`db_name`, `table_name`, `pdf_page_number`)<br />
|
||||
) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>
|
||||
also within this database create:<br />
|
||||
<tt>
|
||||
CREATE TABLE `pma_pdf_pages` (<br />
|
||||
`db_name` varchar(64) NOT NULL default '',<br />
|
||||
`page_nr` int(10) unsigned NOT NULL auto_increment,<br />
|
||||
`page_descr` varchar(50) NOT NULL default '',<br />
|
||||
PRIMARY KEY (page_nr),<br />
|
||||
KEY (db_name)<br />
|
||||
) TYPE=MyISAM COMMENT='PDF Relationpages for PMA';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>
|
||||
put the first table name in
|
||||
<tt>$cfg['Servers'][$i]['table_coords']</tt>
|
||||
and the second table name in
|
||||
put the correct table names in
|
||||
<tt>$cfg['Servers'][$i]['table_coords']</tt> and
|
||||
<tt>$cfg['Servers'][$i]['pdf_pages']</tt>
|
||||
</li>
|
||||
</ul><br />
|
||||
@@ -848,33 +767,15 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
for further information. To use the MIME-transformation system, your column_info
|
||||
table has to have the three new fields 'mimetype', 'transformation', 'transformation_options'.
|
||||
<br /><br />
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
To allow the usage of this functionality:
|
||||
<ul>
|
||||
<li>set up "pmadb" as described above</li>
|
||||
<li>
|
||||
within this database create a table following this scheme:
|
||||
<br />
|
||||
<tt>
|
||||
CREATE TABLE `pma_column_info` (<br />
|
||||
id int(5) unsigned NOT NULL auto_increment,<br />
|
||||
db_name varchar(64) NOT NULL default '',<br />
|
||||
table_name varchar(64) NOT NULL default '',<br />
|
||||
column_name varchar(64) NOT NULL default '',<br />
|
||||
`comment` varchar(255) NOT NULL default '',<br />
|
||||
mimetype varchar(255) NOT NULL default '',<br />
|
||||
transformation varchar(255) NOT NULL default '',<br />
|
||||
transformation_options varchar(255) NOT NULL default '',<br />
|
||||
PRIMARY KEY (id),<br />
|
||||
UNIQUE KEY db_name (db_name, table_name, column_name)<br />
|
||||
) TYPE=MyISAM COMMENT='Comments for Columns';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
|
||||
<li>
|
||||
put the table name in
|
||||
<tt>$cfg['Servers'][$i]['column_info']</tt>
|
||||
</li>
|
||||
<li>
|
||||
To update your PRE-2.5.0 Column_comments Table use this:<br />
|
||||
to update your PRE-2.5.0 Column_comments Table use this:<br />
|
||||
<tt>
|
||||
ALTER TABLE `pma_column_comments` <br />
|
||||
ADD `mimetype` VARCHAR( 255 ) NOT NULL ,<br />
|
||||
@@ -905,25 +806,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
see <b>$cfg['QueryFrame']</b>.
|
||||
<br /><br />
|
||||
|
||||
To allow the usage of this functionality the superuser has to:
|
||||
To allow the usage of this functionality:
|
||||
<ul>
|
||||
<li>set up "pmadb" as described above</li>
|
||||
<li>
|
||||
within this database create a table following this scheme:
|
||||
<br />
|
||||
<tt>
|
||||
CREATE TABLE `pma_history` (<br />
|
||||
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,<br />
|
||||
`username` VARCHAR( 64 ) NOT NULL ,<br />
|
||||
`db` VARCHAR( 64 ) NOT NULL ,<br />
|
||||
`table` VARCHAR( 64 ) NOT NULL ,<br />
|
||||
`timevalue` TIMESTAMP NOT NULL ,<br />
|
||||
`sqlquery` TEXT NOT NULL ,<br />
|
||||
PRIMARY KEY ( `id` ) ,<br />
|
||||
INDEX ( `username` , `db` , `table` , `timevalue` )<br />
|
||||
) TYPE=MyISAM COMMENT='SQL history';<br />
|
||||
</tt>
|
||||
</li>
|
||||
<li>set up <a href="#pmadb">pmadb</a> and the linked-tables infrastructure</li>
|
||||
<li>
|
||||
put the table name in
|
||||
<tt>$cfg['Servers'][$i]['history']</tt>
|
||||
|
Reference in New Issue
Block a user