MySQL Forums
Forum List  »  Newbie

Re: Using a database server...
Posted by: Umesh Shastry
Date: June 16, 2005 03:32AM

Hi!!

You can connect to the remote mysql server..you need to pass the remote mysql server's IP when connecting it..

try this..
<?php

$dbHost = ""; // put the IP address of the machine running mysql server..
$dbUser = ""; // User Name
$dbPwd = ""; Password


$link = mysql_connect($dbHost,$dbUser,$dbPwd);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

Regards,
Umesh Shastry
http://www.blogger.com/profile/02551756983528645221

Options: ReplyQuote


Subject
Written By
Posted
June 15, 2005 11:34PM
Re: Using a database server...
June 16, 2005 03:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.