mysql database cannot connect with cpanel [closed]
- by Rafee
And this question was asked on http://stackoverflow.com/questions/8182119/mysql-database-cannot-connect-with-cpanel
<?php
$con1 = mysql_connect("mywebsiteip","mysql_username","mysql_user_password");
if(!$con1)
{
die ("Could not connect " . mysql_error());
}
else
{
echo "Good connection";
}
mysql_close($con1);
?>
When i run it, it cannot connect to mysql database over cpanel. and i even tried up
$con1 = mysql_connect("mywebsiteip:portnumber","mysql_username","mysql_user_password");
Can any let me know, which one is good way.