database connection
Posted: Wed Jul 14, 2004 9:47 am
hi all,
i'm trying to connect to a database on server 2 and my website is on server 1.
lets say
server 2 ip is 163.1.209.3
server 1 ip is 189.4.689.7
in my db connections file on server 1 i do this
what am i doing wrong?
i'm trying to connect to a database on server 2 and my website is on server 1.
lets say
server 2 ip is 163.1.209.3
server 1 ip is 189.4.689.7
in my db connections file on server 1 i do this
Code: Select all
<?php
$hostname = "163.1.209.3";
$database = "mydb";
$username = "us";
$password = "pa";
$my_conn = mysql_connect($hostname, $username, $password) or die(mysql_error());
mysql_select_db($database,$my_conn);
?>