amitbravo
04-11-2007, 10:43 AM
I have mysql database on www.ravedir.com but i want to access this database from another site www.ravehealthdirectory.com
I do not know how to connect database like this .. i am sure i do not have to use "localhost" but what ?.
Both sites have shared IP address ( do i need to have unique IP address for www.ravedir.com ?) both sites are hosted on linux server with cpanel.
I tried lot of things like this :
mysql_connect("ravedir.com:2082",$user,$pass) or die (mysql_error());
$query=mysql_select_db($database);
mysql_query($query);
even used IP addresses , there is an option in cpanel based linux hosting where you can allow access host adding their name server e.g. ns1.name-services.com .. but failed
visit to http://au.php.net/function.mysql-connect using example.com:3307 as a port .
How could I know about my port exactly.
though i am familiar to php for last few months but hard to me to configure php on server ...
looking forward to hearing soon
kindest regards,
amit
I do not know how to connect database like this .. i am sure i do not have to use "localhost" but what ?.
Both sites have shared IP address ( do i need to have unique IP address for www.ravedir.com ?) both sites are hosted on linux server with cpanel.
I tried lot of things like this :
mysql_connect("ravedir.com:2082",$user,$pass) or die (mysql_error());
$query=mysql_select_db($database);
mysql_query($query);
even used IP addresses , there is an option in cpanel based linux hosting where you can allow access host adding their name server e.g. ns1.name-services.com .. but failed
visit to http://au.php.net/function.mysql-connect using example.com:3307 as a port .
How could I know about my port exactly.
though i am familiar to php for last few months but hard to me to configure php on server ...
looking forward to hearing soon
kindest regards,
amit