Overview
PhpMyadmin has the ability to access multiple MySQL or MariaDB, includes local or remote machines.
In this article, we describe it in briefly.
Reference
The default case
After installation, phpmyadmin has only one database configuration, see phpmyadmin/config.inc.php.
In this case, the UI is as below:
Add another db server
Reference
see: phpMyAdmin/doc/html/config.html#server-connection-settings or Server Connection Settings.
Example
In the end of config.inc.php, add the configuration: – The user, password, port, host, ect, should be changed according your requirement or environment.
/*
* Another DB server
*/
$i++;
$cfg['Servers'][$i]['user'] = 'admin';
$cfg['Servers'][$i]['password'] = 'admin';
$cfg['Servers'][$i]['port'] = 3306;
$cfg['Lang'] = '';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/*
* End of servers configuration
*/
?>
UI
After changing, save the config.inc.php. Then refresh (F5) the phpmyadmin page in the browser. Then there will show a list with which to choose you instrested server. – If the configuration is error, phpmyadmin will occur some error.