Following the post on Connecting mysql remotely via free host,
the remote access still fails. My PHP script is stored in Xtreemhost and intends to access the MySQL database on FreeMySQL.net. If FreeMySQL.net supports remote accesss to MySQL databases (which is true), there should be no problem with my PHP script run on another free web hosting server.
Can anyone tell me what is wrong with my remote access to my MySQL database? Thank you.
<?php
// $server = "example.com";
$server = "sql.example.com";
$username = "tinfanide";
$password = "MyPassword";
$database_name = "tinfanide";
$connect = mysql_connect($server,$username,$password) or die(mysql_error());
mysql_select_db($database_name,$connect);
mysql_close($connect);
?>