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

Bet*_*ide 1 mamp phpmyadmin

我按照如何使用本地phpMyAdmin客户端访问远程服务器?向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
Run Code Online (Sandbox Code Playgroud)

我得到了两个配置服务器的下拉菜单.我选择internal.host.name后,浏览器会说:

Not Found

The requested URL /phpMyAdmin/main.php was not found on this server.
Run Code Online (Sandbox Code Playgroud)

问题是,URL应该结束index.php而不是结束main.php.我怎么能改变呢?

小智 7

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

$cfg['DefaultTabServer'] = 'main.php';
Run Code Online (Sandbox Code Playgroud)

对此:

$cfg['DefaultTabServer'] = 'index.php';
Run Code Online (Sandbox Code Playgroud)