The credentials are working from mysql workbench, but when I try it from PHP it takes a lot of time loading then gives 500 - internal server error.
$DB_HOST = some ip here (NOT localhost or 127.0.0.1) ;
$DB_USER = "myuser";
$DB_PASS = "mypassword";
$DB_NAME = "mydb";
$db = mysql_connect($DB_HOST, $DB_USER, $DB_PASS);
mysql_select_db($DB_NAME,$db) or die("Error In database");
This was working on the dev server, but when moved to a new server it doesnt.
it might be useful to mention that the server runs PHP 5.4 so mysql_connect works fine.
I appreciate if you can help.