phpMyAdmin的第二台服务器指向main.php而不是index.php

时间:2014-10-22 07:12:56

标签: phpmyadmin mamp

我跟着How to access remote server with local phpMyAdmin client?向phpMyAdmin添加第二台服务器:

$i++;
$cfg['Servers'][$i]['host']          = 'internal.host.name'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']              = 'the user name';      // MySQL user
$cfg['Servers'][$i]['password']      = 'secret';          // MySQL password

我得到两个已配置服务器的下拉列表。我选择 internal.host.name 后,浏览器会说:

Not Found

The requested URL /phpMyAdmin/main.php was not found on this server.

问题是,网址应该以{{1​​}}而不是index.php结尾。我怎么能改变它?

1 个答案:

答案 0 :(得分:7)

您必须编辑MAMP/bin/phpMyAdmin/config.inc.php,这是您修改后添加第二台服务器的文件,以便您更改此内容:

$cfg['DefaultTabServer'] = 'main.php';

到此:

$cfg['DefaultTabServer'] = 'index.php';
相关问题