Multi Server phpMyAdmin

Find where the PHPMyAdmin application is located. In this tutorial, the location is /usr/share/webapps/phpmyadmin. Edit the config.inc.php file in that directory and add the following configuration:

$i++;
$cfg['Servers'][$i]['verbose'] = 'MRTG IP 169.1/28';
$cfg['Servers'][$i]['host'] = '192.168.1.5';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';

PHPMyAdmin config.inc.php

Where :

  • verbose is the server name that will appear in PHPMyAdmin.
  • host is the IP address or domain name of the remote MySQL database server.
  • port is the port number of the remote MySQL database server (default 3306).
  • connect_type is the connection type used. There are two options: socket and tcp. We use tcp because the MySQL server is not on the same server as the PHPMyAdmin server that is currently running.
  • extension is the PHP MySQL extension used for the above connection.
  • auth_type is the authentication mode used for login.

After that, try opening the PHPMyAdmin page in a web browser. Then additional options will appear on the login page, as follows:

PMA Login Page