为了通过本地phpMyAdmin客户端访问远程服务器而配置了phmpMyAdmin时发生错误 [英] Error from phmpMyAdmin when is configured in order to access remote server with local phpMyAdmin client
问题描述
为了访问远程数据库,我已经编辑了config.inc.php
,并在其末尾的?>
之前添加了:
In order to access to a remote database I have edited config.inc.php
and at the end of it, before the end ?>
I have added :
$i++;
$cfg['Servers'][$i]['host'] = 'HostName:port'; //provide hostname and port if other than default
$cfg['Servers'][$i]['user'] = 'userName'; //user name for your remote server
$cfg['Servers'][$i]['password'] = 'Password'; //password
$cfg['Servers'][$i]['auth_type'] = 'config'; // keep it as config
但是当我使用浏览器连接时,出现以下错误消息:
but when I connect using browser I have this error message:
./libraries/common.inc.php#1204中的通知未定义变量:i
Notice in ./libraries/common.inc.php#1204 Undefined variable: i
回溯
./phpmyadmin.css.php#14:require_once(./libraries/common.inc.php)
./phpmyadmin.css.php#14: require_once(./libraries/common.inc.php)
版本为:
PHP 5.4.16 Development Server
phpMyAdmin 4.4.15.10
MySQL 5.6.32 - MySQL Community Server (GPL)
phpMyAdmin无需配置common.inc.php
phpMyAdmin works well with local database, without configure common.inc.php
在common.inc.php
中间有一条指令unset($i)
,但是如果common.inc.php
的末尾不再可用,该如何使用i变量呢?
In the middle of common.inc.php
there's this instruction unset($i)
, but how can I use the i variable a the end of common.inc.php
if it is no longer available ?
我已经以此方式初始化
$i=2;
现在我看到一个带有服务器名称的下拉菜单,但是当我选择其中一个时,它将返回到本地主机.
now I see a drop down menu with server name, but when I selected one of them it returns to localhost.
使用mysql命令连接到远程数据库服务器,并使用相同的用户名/密码,我可以成功连接到数据库服务器.
Using mysql command to connect to the remote database server and using the same user/password, I can successfully connect to the database server.
在客户端服务器上,我正在使用Linux,在远程服务器上,我正在使用Windows 7
On client server I'm using Linux, on remote I'm using Windows 7