Mysql – VMware Host only network – Cannot connect to thesql between VMs

MySQLvmware-workstation

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 !

Best Answer

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 !