Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GTS-MEG's avatar

phpmyadmin multiple mysql servers in one machine (Ubuntu VPS)

as The title said, I wanna access the production server and the development databases servers with one phpmyadmin, I add the production server configuration data on config.inc.php, but it seems it's not working, I production server is actually working ( sudo mysql -h 127.0.0.1 -P 3315 -u root -p ......) Here is the production server configuration inside config.inc.php file : /*

  • Second server */ $i++; $cfg['Servers'][$i]['verbose'] = 'Server Name';

    $cfg['Servers'][$i]['host'] = 'localhost:3315';

    $cfg['Servers'][$i]['port'] = '3315';

    $cfg['Servers'][$i]['socket'] = '';

    $cfg['Servers'][$i]['connect_type'] = 'tcp';

    $cfg['Servers'][$i]['extension'] = 'mysql';

    $cfg['Servers'][$i]['auth_type'] = 'config';

    $cfg['Servers'][$i]['user'] = 'root';

    $cfg['Servers'][$i]['password'] = 'password';

    $i++;

0 likes
4 replies
GTS-MEG's avatar

I just write wrong information to the /etc/phpmyadmin/config.inc.php, the server is still working, so is the server using a cached version of config.inc.php ?

GTS-MEG's avatar

@Tray2 Hi, thanks for you answer, In face I followed this article step by step, I do believe now phpmyadmin is using another config file instead of the one in etc/phpmyadmin

I do believe also a database editor is a proper way to handle multiple databases instead of the browser connection.

GTS-MEG's avatar
GTS-MEG
OP
Best Answer
Level 1

Actually, phpmyadmin was looking for the configuration file (config.inc.php) inside usr/share/phpmyadmin directory, so I had to move it there intead of etc/phpmyadmin directory. Problem solved.

Please or to participate in this conversation.