phpmyadmin配置多台服务访问
一:首先官方下载phpmyadmin,此处需要注意你的php与mysql的版本号。http://www.phpmyadmin.net/downloads/
二:下载后,解压到站点。
cd根目录下找到config.sample.inc.php ,将其复制一份,改名为config.inc.php
三:找到 First server处
/*
* First server
*/
//这是第一台服务器
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'host1';//服务器地址
$cfg['Servers'][$i]['port'] = '3306';//端口号
$cfg['Servers'][$i]['connect_type'] = 'tcp';//协议
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
//这是第二台服务器
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'host2';
$cfg['Servers'][$i]['port'] = '3307';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
四:保存
浏览phpmyadmin如图:
页:
[1]