1

I've setup a virtual private network using VMware workstation 11. IPs are configured as so:

  • Host: 192.168.129.1 Physical machine
  • VM: 192.168.129.3 MariaDb database
  • VM: 192.168.129.4 Web app

I'm using CentOS 7 for VMs and i'm trying to connect from the .4 web app to the .3 database.

Ping test are ok for all machines in every direction.

Mysql settings:

 Bind address is 192.168.129.3

 Privileges are granted for root and web app user for the correct database.

VM settings:

 Selinux is disabled, port 3306 is opened with IPtables...

I've spent the morning trying a thousand things but, nope, still no connection.

Here's the error I get when i try to connect with mysql directly:

   mysql -p -h 192.168.129.3

ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.129.3' (113)

What did I miss ?

Thanks for the help !

  • errno 113 is "No route to host". That's either firewall or routing config fail. – womble Dec 22 '15 at 11:19
  • When i try $> route -n – user3779536 Dec 22 '15 at 11:31
  • 0.0.0.0 192.168.129.1 0.0.0.0 UG 100 0 0 eno167777 – user3779536 Dec 22 '15 at 11:33
  • 192.168.129.0 0.0.0.0 255.255.255.0 U 100 0 0 eno167777 – user3779536 Dec 22 '15 at 11:33
  • Doesn't it seems correct ? Thanks womble – user3779536 Dec 22 '15 at 11:33
0

Thanks to Womble for giving me the clue.

My firewall was still blocking traffic. In fact, I'd disabled Selinux while firewalld was active.

So that did the trick:

systemctl disable firewalld
systemctl stop firewalld

Thanks for the help !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.