I have mysql 5 installed on a microsoft windows server 2003. I want to connect to this mysql database from my linux server. Both servers are hosted with different companies and reside in different countries.
I am using the following to connect but i get the following error:
Warning: mysql_connect(): Lost connection to MySQL server during query in /var/www/vhosts/domain/httpdocs/dbs_connection.php on line 13
Lost connection to MySQL server during query
This is the code i'm using
Code: Select all
<?php
$hostname = "00.000.00.00";
$database = "mydb";
$username = "root";
$password = "password";
$conn = mysql_connect($hostname, $username, $password) or die(mysql_error());
mysql_select_db("mydb",$conn);
?>Any ideas what the problem may be?