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