1 -- --------------------------------------------------------
2 -- SQL Commands to set up the pmadb as described in Documentation.html.
4 -- DON'T RUN THIS SCRIPT ON MySQL 4.1.2 AND ABOVE!
5 -- Instead, please run create_tables_mysql_4_1_2+.sql.
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.
11 -- This user "pma" must be defined in config.inc.php (controluser/controlpass)
13 -- Please don't forget to set up the tablenames in config.inc.php
17 -- --------------------------------------------------------
20 -- Database : `phpmyadmin`
22 DROP DATABASE IF EXISTS `phpmyadmin`;
23 CREATE DATABASE `phpmyadmin`;
26 -- --------------------------------------------------------
31 GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO
34 -- --------------------------------------------------------
37 -- Table structure for table `pma_bookmark`
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,
47 ) TYPE=MyISAM COMMENT='Bookmarks';
49 -- --------------------------------------------------------
52 -- Table structure for table `pma_column_info`
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 '',
65 UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
66 ) TYPE=MyISAM COMMENT='Column information for phpMyAdmin';
68 -- --------------------------------------------------------
71 -- Table structure for table `pma_history`
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,
82 KEY `username` (`username`,`db`,`table`,`timevalue`)
83 ) TYPE=MyISAM COMMENT='SQL history for phpMyAdmin';
85 -- --------------------------------------------------------
88 -- Table structure for table `pma_pdf_pages`
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';
99 -- --------------------------------------------------------
102 -- Table structure for table `pma_relation`
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';
116 -- --------------------------------------------------------
119 -- Table structure for table `pma_table_coords`
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';
131 -- --------------------------------------------------------
134 -- Table structure for table `pma_table_info`
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';
144 -- --------------------------------------------------------
147 -- Table structure for table `pma_designer_coords`
150 CREATE TABLE `pma_designer_coords` (
151 `db_name` varchar(64) NOT NULL default '',
152 `table_name` varchar(64) NOT NULL default '',
153 `x` INT(11) default NULL,
154 `y` INT(11) default NULL,
155 `v` TINYINT(4) default NULL,
156 `h` TINYINT(4) default NULL,
157 PRIMARY KEY (`db_name`,`table_name`)
158 ) TYPE=MyISAM COMMENT='Table coordinates for Designer'