MySQL Remote Access

5 posts / 0 new
Last post
#1 Fri, 11/24/2017 - 12:27
LuigiMdg
LuigiMdg's picture

MySQL Remote Access

Hi.. I've a problem with MySQL remote access.. I've created in Webmin a rule that allow access from all ip (to try) to 1 database, but when i try to connect with PHP from other website, I receive this error:

PHP Warning: mysqli::mysqli(): (HY000/2002): Connection timed out in /home3/xstuttoi/public_html/exportProducts.php on line 9

I also tried MySQL WorkBench but not work..!

Fri, 11/24/2017 - 13:45
noisemarine

I can think of two possible problems off the top of my head. Is mysql listening on your external IP address? Usually it is only set to listen on 127.0.0.1. You can check in Webmin->Servers->Mysql Database Server->Mysql Server Configuration->Mysql server listening address. Changes here usually require you to restart the mysql service.

Also, perhaps you haven't opened the port on your firewall?

Sat, 11/25/2017 - 04:07
LuigiMdg
LuigiMdg's picture

The Linux Firewall and Linux Firewall IPv6 was setted to Allow all traffic.
The MySQL Configuration was settet to MySQL server listening address: Any
Furthermore, I've tested the IP of server with nMap with the result:

3306/tcp open mysql

And with https://www.yougetsignal.com/tools/open-ports/ with the result:
3306 is open on 138.xx.xx.202.

Thu, 11/30/2017 - 12:59
LuigiMdg
LuigiMdg's picture

Please help me..!

Wed, 12/13/2017 - 19:15
scotwnw

Think I ran into this quite a while back. The mysql 'ANY' address doesn't work. Try putting in the actual IP of the server in the listening address.

Topic locked