I have setup phpmyadmin on EC2 ubuntu instance. Here is the link: http://ec2-54-191-119-142.us-west-2.compute.amazonaws.com/phpmyadmin
But I am not able to access it from my php file from my laptop.
<?php
$hostname = "ec2-54-191-119-142.us-west-2.compute.amazonaws.com:3306"; //database host server
$database = "fyp_data"; //database name
$username = "root"; //database user
$password = "*********"; //password
$con=mysql_connect($hostname,$username,$password);
if(! $con)
{
die('Connection Failed'.mysql_error());
}
else
echo "hurray!";
?>
Here is the error : "A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond"
I have tried everything. Thanks in advance!