进行了部分调整,适用于phpMyAdmin4.4版本。
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 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | <?php /* * Cookes加密串(使用Cookes授权必填) */ $cfg['blowfish_secret'] = 'fd9d13777c493828683ab33be98d916e'; /* * 默认语言 */ $cfg['DefaultLang'] = 'zh_CN'; /* * 服务器配置 */ $i = 0; /* * 第一台服务器配置 */ $i++; /* 服务器参数 */ $cfg['Servers'][$i]['verbose'] = 'MySQL'; $cfg['Servers'][$i]['host'] = '127.0.0.1'; //某些情况下localhost会导致运行缓慢 $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = false; /* 隐藏表 */ $cfg['Servers'][$i]['hide_db'] = '(information[去掉我]_schema|performance_schema|phpmyadmin|mysql)'; /* * phpMyAdmin存储配置 */ /* 用于处理与储存的操作用户 */ // $cfg['Servers'][$i]['controlhost'] = ''; // $cfg['Servers'][$i]['controlport'] = ''; $cfg['Servers'][$i]['controluser'] = 'root'; $cfg['Servers'][$i]['controlpass'] = '123456'; /* 存储数据库和表 */ // $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]['table_uiprefs'] = 'pma__table_uiprefs'; // $cfg['Servers'][$i]['tracking'] = 'pma__tracking'; // $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig'; // $cfg['Servers'][$i]['recent'] = 'pma__recent'; // $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; // $cfg['Servers'][$i]['users'] = 'pma__users'; // $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; // $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; // $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; // $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; /* 选择默认服务器 */ $cfg['ServerDefault'] = 1; /* * 根据IP自动授权 */ function auLogin(){ $ip = $_SERVER['REMOTE_ADDR']; if ($ip == '127.0.0.1') return true; $ip1 = getenv("HTTP_X_FORWARDED_FOR"); $ip2 = getenv("HTTP_CLIENT_IP"); ($ip1) ? $ip = $ip1:null; ($ip2) ? $ip = $ip2:null; $ip1 = '8.8.4.4'; $ip2 = '8.8.8.8'; return ($ip >= $ip1 && $ip <= $ip2); } if(auLogin()){ $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = '123456'; $cfg['Servers'][$i]['only_db'] = ''; }else{ $cfg['Servers'][$i]['auth_type'] = 'cookie'; } /* * 服务器配置结束 */ /* * 上传/保存目录 */ $cfg['UploadDir'] = ''; $cfg['SaveDir'] = ''; /* * 默认模板 */ $cfg['ThemeDefault'] = 'metro'; /* * 是否在表中显示图标 可选值 'icons/text/both' */ $cfg['RowActionType'] = 'both'; /* * 允许显示所有行 */ $cfg['ShowAll'] = false; /* * 启用Gzip缓存 */ $cfg['OBGzip'] = 'auto'; /* * MySQL持久连接 */ $cfg['PersistentConnections'] = false; /* * 最大脚本执行时间 */ $cfg['PersistentConnections'] = false; /* * 默认分页大小 */ $cfg['MaxRows'] = 50; /* * 默认排序 */ $cfg['Order'] = 'ASC'; /* * 压缩格式 */ $cfg['ZipDump'] = false; $cfg['GZipDump'] = true; $cfg['BZipDump'] = false; /* * 隐藏服务器选择框 */ $cfg['LeftDisplayServers'] = false; /* * 屏蔽警告 */ $cfg['PmaNoRelation_DisableWarning'] = true; $cfg['SuhosinDisableWarning'] = true; /* * 左侧LOGO显示 */ $cfg['NavigationDisplayLogo'] = true; /* * 左侧树形结构显示 */ $cfg['ShowDatabasesNavigationAsTree'] = true; /* * 近期访问表数量 */ $cfg['NumRecentTables'] = 0; /* * 表收藏 */ $cfg['NumFavoriteTables'] = 0; /* * 启用侧边栏展开数据库 */ $cfg['NavigationTreeEnableExpansion'] = false; /* * 启用自动分组 */ $cfg['NavigationTreeEnableGrouping'] = false; /* * 左侧数据库分页大小 */ $cfg['MaxDbList'] = 1000; /* * 主页显示服务器详细信息 */ $cfg['ShowStats'] = false; $cfg['ShowServerInfo'] = false; /* * 检查更新 */ $cfg['VersionCheck'] = false; /* * 导出格式 */ $cfg['Export']['compression'] = 'gzip'; $cfg['Export']['format'] = 'sql'; |
再发一套模板,根据官方发布的metro 2.2对中文字体做了部分优化
新版已经不用 NavigationTreeEnableGrouping 而是 LeftFrameDBTree 了。