Connecting to SQL database from external server

Hello everybody,

Just had my host migrate my website to a new server. Previously on my last server I allowed some external websites connect to a specific database on my SQL server via a specific SQL user. I need to know how to set this up via virtualmin.

under Servers > Mysql database server i have set up user permissions, database permissions and host permissions but I still cannot connect. In the file on the external server I am using the IP address of my server as the hostname.

Is there some additional setting in virtualmin I must change to allow these connections? E.g. some setting in ‘MySQL System Variables’?

I found some older threads on the forum but most seem to be a little out of date.

Thanks in advance for any help.


What error is it that you’re getting?

However, you’d want to start by going into Edit Databases -> Remote Hosts for the domain that owns the database, and add the IP addresses of the servers who will be connecting to the database.


it wont connect. “unable to connect”

added remote host as suggested but no luck.


By default, MySQL doesn’t listen for remote connections. So if you didn’t already, the other thing you’d need to do is go into Webmin -> Servers -> MySQL -> MySQL Server Configuration, and set “MySQL server listening address” to something like “”, and then click “Save and Restart MySQL”.


Thanks for the replies. Ive had to send a ticket to my hosting company. Hopefully theyll be able to sort it out within a few days. Ill post here if I get info on a solution.