Connect to external server by using phpMyAdmin

PHPServer Side ProgrammingProgramming

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

$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 "" and the one provided with $cfg['Servers'][$i]['host'].

The user can switch between both the servers.

Published on 06-Apr-2020 12:12:38