MySQL not accessible outside Localhost

SYSTEM INFORMATION
OS type and version: VMWare 6.7 / Ubuntu 20.04
Webmin version: Latest
Virtualmin version: Latest
Related products version: Latest

Howdy!

I’m a complete noob on Virtualmin, but I managed to do most of the setup up of my Virtualmin instance, inside a VMWare Hypervisor, ver. 6.7

I’ll guide you through what I do, and how it’s not working for me:
MySQL works fine in Localhost, but when I try to go outside local, it dies. I’ve opened my port 3306 on my router, as well as port http and ftp, https, but only http seems to work.

My plan is to have the rest (12) of my instances write on the Virtualmin Database, the issue is that all of them have proxys. And I’m not able to connect to it.

I don’t mind if my db may be not as secure, since it’s a scrapping server, nonetheless, I neither can ftp nor MySQL any of the instances (All of them running ubuntu 20.04 as well) .

Any ideas?

@max783,

Have you adjusted your MySQL installation to allow binding outside “127.0.0.1”? No matter how you setup your firewall, it will not work unless MySQL itself is permitting traffic from non-localhost addresses.

1 Like

I am not entirely sure. I’ve did this:

But I’m not sure it’s enough.

@max783,

That’s on a per connection basis for a specific database. However if your MySQL is bound to “127.0.0.1” which it likely is by default you need to disable this.

Webmin > Servers > MySQL Database Server > Edit Config Files"

Check each of the configuration files in the dropdown list at the top of the editor until you see on that includes:

bind-address = 127.0.0.1

and quite possibily

mysqlx-bind-address = 127.0.0.1

Disable these lines by adding a semicolon (";") in front of them.

Save and Close

Then Stop, and Start MySQL Server

1 Like

Thank you so very much!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.