我的phpMyAdmin config.inc.php中有以下代码:
/* Server 1 */
$i++;
$cfg['Servers'][$i]['host'] = 'server1.com:3306';
$cfg['Servers'][$i]['user'] = 'user1';
$cfg['Servers'][$i]['password'] = 'passwd1';
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server 2 */
$i++;
$cfg['Servers'][$i]['host'] = 'server2.com:3306';
$cfg['Servers'][$i]['user'] = 'user2';
$cfg['Servers'][$i]['password'] = 'passwd2';
$cfg['Servers'][$i]['auth_type'] = 'config';
不幸的是,phpMyAdmin UI仅显示两个服务器之一。我在这里想念什么?
答案 0 :(得分:0)
您需要为每个服务器添加一个“详细”密钥,例如:
$cfg['Servers'][$i]['verbose'] = 'Database Server 2';
答案 1 :(得分:0)
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'svr2.mysql';
$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;
/*
* Second server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'svr3.mysql';
$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;
/*
* Third server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'svr4.mysql';
$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;
答案 2 :(得分:0)
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['verbose'] = 'no1';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['port'] = 3306;
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['verbose'] = 'no2';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '10.9.8.1';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['port'] = 3306;
要正常工作,您需要指定auth_type = cookie并定义详细信息,其中显示了服务器名称,您可以从中选择名称以查看详情