Configure PHPMYADMIN to connect to different servers

Author - Ashish

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

1. Open 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 “?>”

$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.


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

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published.