1

I am trying to establish a connection using mysqli as to connect with the database. Using the same credentials (host, username, and password), I have been able to successfully login in mysql workbench so I know the credentials are correct. However, I constantly receive the following error:

Failed to connect to MySQL:No such file or directory.

<?php
$con = mysqli_connect("...west-2.rds.amazonaws.com","usernameshown in aws rds","password","database name");

if (mysqli_connect_errno())
{
    echo "Failed to connect to MySQL:" . mysqli_connect_error();
}

?>
jon e
  • 31
  • 1
  • 7
  • Might be a duplicate of http://stackoverflow.com/questions/27778263/can-not-remote-connect-to-rds-db-instance-of-aws Have a look at my answer there – Sébastien Stormacq Jan 05 '15 at 14:24

0 Answers0