Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29245

AWS EC2 suddenly cannot connect to RDS?

$
0
0

Suddenly, wordpress cannot connect to my RDS. all configurations and inbound/outbound rules are correct. I also tried creating basic php function to connect.. I tried it on my local machine and it's working but not on my EC2 server.

$mysqli_connection = new MySQLi('xxxx.xxxxx.ap-southeast-1.rds.amazonaws.com', 'db_user', 'db_pass', 'db_name');
if ($mysqli_connection->connect_error) {
   echo "Not connected, error: " . $mysqli_connection->connect_error;
}
else {
   echo "Connected.";
}

Error: php_network_getaddresses: getaddrinfo failed: Name or service not known

Just this morning this happened, I didn't do anything at all. Maybe this is an Apache error or something? any help please?


Viewing all articles
Browse latest Browse all 29245

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>