Источник:
1 2 |
http://php-myadmin.ru/learning/instrument-pma.html http://www.novell.com/communities/node/8932/enable-designer-phpmyadmin |
Configuration Change
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
1. Open the file libraries/config.default.php. Change the following lines: $cfg['Servers'][$i]['pmadb'] = ''; $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; $cfg['Servers'][$i]['table_info'] = ''; $cfg['Servers'][$i]['table_coords'] = ''; $cfg['Servers'][$i]['pdf_pages'] = ''; $cfg['Servers'][$i]['column_info'] = ''; $cfg['Servers'][$i]['history'] = ''; $cfg['Servers'][$i]['designer_coords'] = ''; to $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; $cfg['Servers'][$i]['relation'] = 'pma_relation'; $cfg['Servers'][$i]['table_info'] = 'pma_table_info'; $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; $cfg['Servers'][$i]['column_info'] = 'pma_column_info'; $cfg['Servers'][$i]['history'] = 'pma_history'; $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; 2. Also, Create DB name phpmyadmin and run this script: -- -------------------------------------------------------- -- SQL Commands to set up the pmadb as described in Documentation.html. -- -- DON'T RUN THIS SCRIPT ON MySQL 4.1.2 AND ABOVE! -- Instead, please run create_tables_mysql_4_1_2+.sql. -- -- This script expects the user pma to already be existing. If we would put a -- line here to create him too many users might just use this script and end -- up with having the same password for the controluser. -- -- This user "pma" must be defined in config.inc.php (controluser/controlpass) -- -- Please don't forget to set up the tablenames in config.inc.php -- -- $Id: create_tables.sql 10257 2007-04-07 14:40:24Z lem9 $ -- -------------------------------------------------------- -- -- Database : `phpmyadmin` -- DROP DATABASE IF EXISTS `phpmyadmin`; CREATE DATABASE `phpmyadmin`; USE phpmyadmin; -- -------------------------------------------------------- -- -- Privileges -- GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO 'pma'@localhost; -- -------------------------------------------------------- -- -- Table structure for table `pma_bookmark` -- CREATE TABLE `pma_bookmark` ( `id` int(11) NOT NULL auto_increment, `dbase` varchar(255) NOT NULL default '', `user` varchar(255) NOT NULL default '', `label` varchar(255) NOT NULL default '', `query` text NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='Bookmarks'; -- -------------------------------------------------------- -- -- Table structure for table `pma_column_info` -- CREATE TABLE `pma_column_info` ( `id` int(5) unsigned NOT NULL auto_increment, `db_name` varchar(64) NOT NULL default '', `table_name` varchar(64) NOT NULL default '', `column_name` varchar(64) NOT NULL default '', `comment` varchar(255) NOT NULL default '', `mimetype` varchar(255) NOT NULL default '', `transformation` varchar(255) NOT NULL default '', `transformation_options` varchar(255) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`) ) TYPE=MyISAM COMMENT='Column information for phpMyAdmin'; -- -------------------------------------------------------- -- -- Table structure for table `pma_history` -- CREATE TABLE `pma_history` ( `id` bigint(20) unsigned NOT NULL auto_increment, `username` varchar(64) NOT NULL default '', `db` varchar(64) NOT NULL default '', `table` varchar(64) NOT NULL default '', `timevalue` timestamp(14) NOT NULL, `sqlquery` text NOT NULL, PRIMARY KEY (`id`), KEY `username` (`username`,`db`,`table`,`timevalue`) ) TYPE=MyISAM COMMENT='SQL history for phpMyAdmin'; -- -------------------------------------------------------- -- -- Table structure for table `pma_pdf_pages` -- CREATE TABLE `pma_pdf_pages` ( `db_name` varchar(64) NOT NULL default '', `page_nr` int(10) unsigned NOT NULL auto_increment, `page_descr` varchar(50) NOT NULL default '', PRIMARY KEY (`page_nr`), KEY `db_name` (`db_name`) ) TYPE=MyISAM COMMENT='PDF relation pages for phpMyAdmin'; -- -------------------------------------------------------- -- -- Table structure for table `pma_relation` -- CREATE TABLE `pma_relation` ( `master_db` varchar(64) NOT NULL default '', `master_table` varchar(64) NOT NULL default '', `master_field` varchar(64) NOT NULL default '', `foreign_db` varchar(64) NOT NULL default '', `foreign_table` varchar(64) NOT NULL default '', `foreign_field` varchar(64) NOT NULL default '', PRIMARY KEY (`master_db`,`master_table`,`master_field`), KEY `foreign_field` (`foreign_db`,`foreign_table`) ) TYPE=MyISAM COMMENT='Relation table'; -- -------------------------------------------------------- -- -- Table structure for table `pma_table_coords` -- CREATE TABLE `pma_table_coords` ( `db_name` varchar(64) NOT NULL default '', `table_name` varchar(64) NOT NULL default '', `pdf_page_number` int(11) NOT NULL default '0', `x` float unsigned NOT NULL default '0', `y` float unsigned NOT NULL default '0', PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`) ) TYPE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output'; -- -------------------------------------------------------- -- -- Table structure for table `pma_table_info` -- CREATE TABLE `pma_table_info` ( `db_name` varchar(64) NOT NULL default '', `table_name` varchar(64) NOT NULL default '', `display_field` varchar(64) NOT NULL default '', PRIMARY KEY (`db_name`,`table_name`) ) TYPE=MyISAM COMMENT='Table information for phpMyAdmin'; -- -------------------------------------------------------- -- -- Table structure for table `pma_designer_coords` -- CREATE TABLE `pma_designer_coords` ( `db_name` varchar(64) NOT NULL default '', `table_name` varchar(64) NOT NULL default '', `x` INT(11) default NULL, `y` INT(11) default NULL, `v` TINYINT(4) default NULL, `h` TINYINT(4) default NULL, PRIMARY KEY (`db_name`,`table_name`) ) TYPE=MyISAM COMMENT='Table coordinates for Designer' |