Basic troubleshooting
The first test we should perform is a simple ping from the blog server to the database server. This will quickly answer whether the two servers are able to communicate at all:
[blog]$ ping db.example.com PING db.example.com (192.168.33.12) 56(84) bytes of data. 64 bytes from db.example.com (192.168.33.12): icmp_seq=1 ttl=64 time=0.420 ms 64 bytes from db.example.com (192.168.33.12): icmp_seq=2 ttl=64 time=0.564 ms 64 bytes from db.example.com (192.168.33.12): icmp_seq=3 ttl=64 time=0.562 ms 64 bytes from db.example.com (192.168.33.12): icmp_seq=4 ttl=64 time=0.479 ms ^C --- db.example.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3006ms rtt min/avg/max/mdev = 0.420/0.506/0.564/0.062 ms
From the ping
command's results we can see that the blog server can communicate with the database server, or rather, the blog server sent an ICMP echo request and received an ICMP echo reply from the database server. The next connectivity we can test...