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

  • Host: Physical machine
  • VM: MariaDb database
  • VM: 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

 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

ERROR 2003 (HY000): Can't connect to MySQL server on '' (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
  • UG 100 0 0 eno167777 – user3779536 Dec 22 '15 at 11:33
  • 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

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.