How to Enable external database connection for specific ip

I want to be able to enable external database connection from a specific IP address. How am I able to do that when currently MySQL is only accepting connections locally.

There are a few ways. Perhaps the simplest would be to tunnel the connection through ssh.

But if that doesn’t fit your use-case, you’d have to first, change the bind address setting in /etc/mysql/maridb.conf.d/50-server.cnf
bind-address = # change to

Then you’d need to add a firewall rule allowing access to port 3306 from your external IP.

Finally you’d need to make sure your database user has an entry set up for Host = % which I think is the default for db users created in Hestia.
mysql -e “select User,Host from mysql.user”
| User | Host |
| onlyme | % | <---- this is what you need
| onlyme | localhost |