Hestiacp + phpmyadmin without database?

Hello everyone,
I have a peculiar situation and would like some help.

My server has hestiacp + mariadb + php fpm + apache (I call it “hestia server” here).
I recently moved mariadb to another server BUT I my “hestia server” continue left it installed mariadb. It has phpmyadmin installed on it, which communicates with the mariadb host/server. It works perfectly.

However, the “hestiacp server” is running Ubuntu 22.04 and I would like to have Ubuntu 24.04 soon.

If I install a new Ubuntu 24.04 server (php + apache) WITHOUT DATABASE/MARIADB, how can I use phpmyadmin to connect to the database remotely, as I currently do?

Thank, last update is great!!

Great work guys