cp config.sample.inc.php config.inc.php
vim config.inc.php
/**
* First server
*/
//$i++;
/* Authentication type */
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'master.rds.aliyun.com';
//$cfg['Servers'][$i]['compress'] = false;
//$cfg['Servers'][$i]['AllowNoPassword'] = false;
$hosts = array(
'1' => array('host'=>'master.rds.aliyun.com', 'port'=>3306),
'2' => array('host'=>'slave.rds.aliyun.com', 'port'=>3306)
);
for ($i=1; $i<=count($hosts); $i++) {
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = $hosts[$i]['host']; //修改host
$cfg['Servers'][$i]['port'] = $hosts[$i]['port'];
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';
//$cfg['Servers'][$i]['AllowNoPassword'] = true;
//$cfg['Servers'][$i]['user'] = $hosts[$i]['user']; //修改用户名
//$cfg['Servers'][$i]['password'] = $hosts[$i]['password']; //密码
/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
}