Configure PHPMYADMIN to connect to different servers

|
| By Webner

Here are the steps to set up PHPMYADMIN to connect to database servers located at different ip addresses:

1. Open config.inc.php located in C:\xampp\phpMyAdmin directory in windows and located in /etc/phpmyadmin directory in Ubuntu.

2. Add the below written code at the end of the file before “?>”

$i++;
$cfg['Servers'][$i]['host'] = ‘’;
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = TRUE;
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['auth_type'] = 'config';

3. Now, When we open PHPMYADMIN in browser, You will See a third option of Server Choice.
See Screenshot below.

1

We can choose to which database server we want to login, enter credential information and it will connect you to the respective database.

Leave a Reply

Your email address will not be published. Required fields are marked *