一:首先官方下载phpmyadmin,此处需要注意你的php与mysql的版本号。
http://www.phpmyadmin.net/downloads/
二:下载后,解压到站点。
cd根目录下找到config.sample.inc.php ,将其复制一份,改名为config.inc.php
三:找到 First server处
1 /* 2 * First server 3 */ 4 //这是第一台服务器 5 $i++; 6 /* Authentication type */ 7 $cfg['Servers'][$i]['auth_type'] = 'cookie'; 8 /* Server parameters */ 9 $cfg['Servers'][$i]['host'] = 'host1';//服务器地址 10 $cfg['Servers'][$i]['port'] = '3306';//端口号 11 $cfg['Servers'][$i]['connect_type'] = 'tcp';//协议 12 $cfg['Servers'][$i]['compress'] = false; 13 $cfg['Servers'][$i]['AllowNoPassword'] = false; 14 15 //这是第二台服务器 16 $i++; 17 /* Authentication type */ 18 $cfg['Servers'][$i]['auth_type'] = 'cookie'; 19 /* Server parameters */ 20 $cfg['Servers'][$i]['host'] = 'host2'; 21 $cfg['Servers'][$i]['port'] = '3307'; 22 $cfg['Servers'][$i]['connect_type'] = 'tcp'; 23 $cfg['Servers'][$i]['compress'] = false; 24 $cfg['Servers'][$i]['AllowNoPassword'] = false;
四:保存
浏览phpmyadmin如图: