Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

RadicalActivity's avatar

[URGENT] - SQLSTATE[HY000] [2002] No route to host

I have 2 servers. 1 is serving the websites and the other is the MySQL server.

I'm hosting them on Vultr. Everything was going well, uptime was 100% for the past few months, and suddenly, without changing anything on the server I've got this error message from the Webserver: SQLSTATE[HY000] [2002] No route to host

I'm using Laravel 5.5. I've checked the IP addresses of the servers but they haven't changed.

Does anyone have a clue what could be the problem?

0 likes
2 replies
Snapey's avatar

can you ping from one server to the other? Are you using IPs or hostnames?

synyo's avatar

What solved the issue for me was:

sysctl net.ipv4.conf.all.forwarding=1
sudo iptables -P FORWARD ACCEPT

Please or to participate in this conversation.