250 |
kaklik |
1 |
-- -------------------------------------------------------- |
|
|
2 |
-- SQL Commands to set up the pmadb as described in Documentation.html. |
|
|
3 |
-- |
|
|
4 |
-- DON'T RUN THIS SCRIPT ON MySQL 4.1.2 AND ABOVE! |
|
|
5 |
-- Instead, please run create_tables_mysql_4_1_2+.sql. |
|
|
6 |
-- |
|
|
7 |
-- This script expects the user pma to already be existing. If we would put a |
|
|
8 |
-- line here to create him too many users might just use this script and end |
|
|
9 |
-- up with having the same password for the controluser. |
|
|
10 |
-- |
|
|
11 |
-- This user "pma" must be defined in config.inc.php (controluser/controlpass) |
|
|
12 |
-- |
|
|
13 |
-- Please don't forget to set up the tablenames in config.inc.php |
|
|
14 |
-- |
|
|
15 |
-- $Id: create_tables.sql,v 2.9 2004/07/18 13:06:03 lem9 Exp $ |
|
|
16 |
|
|
|
17 |
-- -------------------------------------------------------- |
|
|
18 |
|
|
|
19 |
-- |
|
|
20 |
-- Database : `phpmyadmin` |
|
|
21 |
-- |
|
|
22 |
DROP DATABASE IF EXISTS `phpmyadmin`; |
|
|
23 |
CREATE DATABASE `phpmyadmin`; |
|
|
24 |
USE phpmyadmin; |
|
|
25 |
|
|
|
26 |
-- -------------------------------------------------------- |
|
|
27 |
|
|
|
28 |
-- |
|
|
29 |
-- Privileges |
|
|
30 |
-- |
|
|
31 |
GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO |
|
|
32 |
'pma'@localhost; |
|
|
33 |
|
|
|
34 |
-- -------------------------------------------------------- |
|
|
35 |
|
|
|
36 |
-- |
|
|
37 |
-- Table structure for table `pma_bookmark` |
|
|
38 |
-- |
|
|
39 |
|
|
|
40 |
CREATE TABLE `pma_bookmark` ( |
|
|
41 |
`id` int(11) NOT NULL auto_increment, |
|
|
42 |
`dbase` varchar(255) NOT NULL default '', |
|
|
43 |
`user` varchar(255) NOT NULL default '', |
|
|
44 |
`label` varchar(255) NOT NULL default '', |
|
|
45 |
`query` text NOT NULL, |
|
|
46 |
PRIMARY KEY (`id`) |
|
|
47 |
) TYPE=MyISAM COMMENT='Bookmarks'; |
|
|
48 |
|
|
|
49 |
-- -------------------------------------------------------- |
|
|
50 |
|
|
|
51 |
-- |
|
|
52 |
-- Table structure for table `pma_column_info` |
|
|
53 |
-- |
|
|
54 |
|
|
|
55 |
CREATE TABLE `pma_column_info` ( |
|
|
56 |
`id` int(5) unsigned NOT NULL auto_increment, |
|
|
57 |
`db_name` varchar(64) NOT NULL default '', |
|
|
58 |
`table_name` varchar(64) NOT NULL default '', |
|
|
59 |
`column_name` varchar(64) NOT NULL default '', |
|
|
60 |
`comment` varchar(255) NOT NULL default '', |
|
|
61 |
`mimetype` varchar(255) NOT NULL default '', |
|
|
62 |
`transformation` varchar(255) NOT NULL default '', |
|
|
63 |
`transformation_options` varchar(255) NOT NULL default '', |
|
|
64 |
PRIMARY KEY (`id`), |
|
|
65 |
UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`) |
|
|
66 |
) TYPE=MyISAM COMMENT='Column information for phpMyAdmin'; |
|
|
67 |
|
|
|
68 |
-- -------------------------------------------------------- |
|
|
69 |
|
|
|
70 |
-- |
|
|
71 |
-- Table structure for table `pma_history` |
|
|
72 |
-- |
|
|
73 |
|
|
|
74 |
CREATE TABLE `pma_history` ( |
|
|
75 |
`id` bigint(20) unsigned NOT NULL auto_increment, |
|
|
76 |
`username` varchar(64) NOT NULL default '', |
|
|
77 |
`db` varchar(64) NOT NULL default '', |
|
|
78 |
`table` varchar(64) NOT NULL default '', |
|
|
79 |
`timevalue` timestamp(14) NOT NULL, |
|
|
80 |
`sqlquery` text NOT NULL, |
|
|
81 |
PRIMARY KEY (`id`), |
|
|
82 |
KEY `username` (`username`,`db`,`table`,`timevalue`) |
|
|
83 |
) TYPE=MyISAM COMMENT='SQL history for phpMyAdmin'; |
|
|
84 |
|
|
|
85 |
-- -------------------------------------------------------- |
|
|
86 |
|
|
|
87 |
-- |
|
|
88 |
-- Table structure for table `pma_pdf_pages` |
|
|
89 |
-- |
|
|
90 |
|
|
|
91 |
CREATE TABLE `pma_pdf_pages` ( |
|
|
92 |
`db_name` varchar(64) NOT NULL default '', |
|
|
93 |
`page_nr` int(10) unsigned NOT NULL auto_increment, |
|
|
94 |
`page_descr` varchar(50) NOT NULL default '', |
|
|
95 |
PRIMARY KEY (`page_nr`), |
|
|
96 |
KEY `db_name` (`db_name`) |
|
|
97 |
) TYPE=MyISAM COMMENT='PDF relation pages for phpMyAdmin'; |
|
|
98 |
|
|
|
99 |
-- -------------------------------------------------------- |
|
|
100 |
|
|
|
101 |
-- |
|
|
102 |
-- Table structure for table `pma_relation` |
|
|
103 |
-- |
|
|
104 |
|
|
|
105 |
CREATE TABLE `pma_relation` ( |
|
|
106 |
`master_db` varchar(64) NOT NULL default '', |
|
|
107 |
`master_table` varchar(64) NOT NULL default '', |
|
|
108 |
`master_field` varchar(64) NOT NULL default '', |
|
|
109 |
`foreign_db` varchar(64) NOT NULL default '', |
|
|
110 |
`foreign_table` varchar(64) NOT NULL default '', |
|
|
111 |
`foreign_field` varchar(64) NOT NULL default '', |
|
|
112 |
PRIMARY KEY (`master_db`,`master_table`,`master_field`), |
|
|
113 |
KEY `foreign_field` (`foreign_db`,`foreign_table`) |
|
|
114 |
) TYPE=MyISAM COMMENT='Relation table'; |
|
|
115 |
|
|
|
116 |
-- -------------------------------------------------------- |
|
|
117 |
|
|
|
118 |
-- |
|
|
119 |
-- Table structure for table `pma_table_coords` |
|
|
120 |
-- |
|
|
121 |
|
|
|
122 |
CREATE TABLE `pma_table_coords` ( |
|
|
123 |
`db_name` varchar(64) NOT NULL default '', |
|
|
124 |
`table_name` varchar(64) NOT NULL default '', |
|
|
125 |
`pdf_page_number` int(11) NOT NULL default '0', |
|
|
126 |
`x` float unsigned NOT NULL default '0', |
|
|
127 |
`y` float unsigned NOT NULL default '0', |
|
|
128 |
PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`) |
|
|
129 |
) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output'; |
|
|
130 |
|
|
|
131 |
-- -------------------------------------------------------- |
|
|
132 |
|
|
|
133 |
-- |
|
|
134 |
-- Table structure for table `pma_table_info` |
|
|
135 |
-- |
|
|
136 |
|
|
|
137 |
CREATE TABLE `pma_table_info` ( |
|
|
138 |
`db_name` varchar(64) NOT NULL default '', |
|
|
139 |
`table_name` varchar(64) NOT NULL default '', |
|
|
140 |
`display_field` varchar(64) NOT NULL default '', |
|
|
141 |
PRIMARY KEY (`db_name`,`table_name`) |
|
|
142 |
) TYPE=MyISAM COMMENT='Table information for phpMyAdmin'; |