-2
Hello I have a php site where he accesses the Mysql database everything worked perfectly until today the afternoon when out of nowhere he started to bring me the error whenever he tries to access mysql Connection failed: No route to host, did not touch anything in the code and it keeps giving error, the same code accesses other servers without problem by the same site but only this server does not work, I do not know what to do a detail if I run php from another machine with an ip other than mine it works normal to access the server. I do not know if there is something blocking. the server I am accessing is not local follows here an example of my code
<?php
$host = "123.123.123.123:5600";
$user = "abc";
$pass = "123456";
$base = "tec";
$mysqli_connection = new MySQLi($host, $user, $pass, $base);
if($mysqli_connection->connect_error){
echo "Desconectado! Erro: " . $mysqli_connection->connect_error;
}else{
echo "Conectado!";
}
?>
Help me do not know what else I can do, I just have problems on a server in specific the rest is normal
The server is not local as mentioned in the advertisement
– FireWallSP
Take a look at this question: https://stackoverflow.com/questions/57001170/mysql-connection-failed-no-route-to-host if it is a similar problem.
– Braz Brz
If you are using Linux try this path: https://www.maketecheasier.com/fix-no-route-to-host-error-linux/
– Braz Brz