Connect to external server by using phpMyAdmin


The below lines of code can be added to the /etc/phpmyadmin/config.inc.php file at the bottom −

$i++;
$cfg['Servers'][$i]['host'] = 'HostName:port'; 
// hostname and port are provided if they are not default values
$cfg['Servers'][$i]['user'] = 'userName'; 
//user name for the remote server
$cfg['Servers'][$i]['password'] = 'Password'; 
//the password
$cfg['Servers'][$i]['auth_type'] = 'config';

It will display “Current Server:” with drop down of both "127.0.0.1" and the one provided with $cfg['Servers'][$i]['host'].

The user can switch between both the servers.

Updated on: 06-Apr-2020

181 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements