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:
Notice in ./libraries/common.inc.php#1204 Undefined variable: i
Backtrace
./phpmyadmin.css.php#14: require_once(./libraries/common.inc.php)
The versions are:
PHP 5.4.16 Development Server
phpMyAdmin 4.4.15.10
MySQL 5.6.32 - MySQL Community Server (GPL)
phpMyAdmin works well with local database, without configure common.inc.php
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 have initialized i in this way
$i=2;
now I see a drop down menu with server name, but when I selected one of them it returns to localhost.
Using mysql command to connect to the remote database server and using the same user/password, I can successfully connect to the database server.
On client server I'm using Linux, on remote I'm using Windows 7
I have entered another request regarding the server selection problem only at phpMyAdmin can't connect to remote sever on Windows 7 from Linux client