ITeye博客

phpmyadmin管理多台mysql的方法(自用)

henry2009 · 2010-10-13 14:17 · linux · 编程语言 · PHP · MySQL · Markdown

$i = 0;
$host_list = array('localhost','192.168.1.xx');
/*
 * First server
 */

foreach($host_list as $i=>$host){
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['host'] = $host;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$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';

}

找到config.default.php,copy 为 config.inc.php到phpmyadmin跟目录,然后加上以上代码。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。