Go to the cyberpanel admin page.
Databases → List Databases
Choose the domain.
In from of the database you want to access remotely, click the “Manage” button.
At “Allow Remote Access on following IP” write “%” and then click save changes, as in the image bellow.
What error does it give you when connecting?
Is it a connection time out? If so, have you made sure your firewall port is open?
Are you connecting directly by IP or using the domain name? The domain name runs by cloudflare or anything similar in that case?
Have you also tried to whitelist your IP at the firewall?
Are you using CSF aswell? If so, have you tried whitelisting your ip there also?
If everything above failed, disable firewall and attempt to connect, then reply here if with firewall disabled it works or not (then re-enable firewall after testing)
Do you know if it’s possible to only whitelist our own (or a few) IPs? I assume % opens it up to the world and that’s not necessary. I was expecting the “Remote Access” dialog to let us add multiple IPs, but it just overrides the default “localhost”.
(edit 1)
I suppose the firewall could do the whitelisting for us, for anyone interested who is also using UFW (that’s not the default CP firewall):
ufw allow from LOCAL_DEV_IP to any port 3306 proto tcp comment 'MariaDB'
But I’m still curious about my first question.
(edit 2)
Disabling bind-address seems to be required. Without it, setting % doesn’t help, and if you have bind-address disabled you don’t need %.
Minimal setup summary so far:
Disable bind-address.
Allow your local dev ip through the firewall to 3306/tcp.