remote mysql connection

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

remote mysql connection

Post by cheatboy00 »

for my site i ahve it so you can join.. but i also want to add the user to the fourm as soon as they join.. that would require me to connect to the database that the mb is on and insert them into the members table... i can do the inserting and etc.... but i cant connect ot the database.... the database isn't the local host... nor is the db on the same host...

its hosted on f2o.org and the page i'm trying to connect to the f2o.org site is on nicewebshost.com

Code: Select all

$dbh = mysql_connect ("f2o.org", "monotonous", "$pass") or die ('I cannot connect to the database.');
   mysql_select_db ("monotonous");
i've tried that and monotonous.f2o.org(which is the site).... when i goto the page that this query is located on it wont load the page(well i dont wait any longer than a minute for it to load).

please help
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

maybe they blocked the port on their world-interface.
There's nothing listening at f2o.org:3306 ;)
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

Post by cheatboy00 »

so your saying its not possible..... unless i like redirect to a page that is hosted on f2o.org and then do it that way....
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

probably, but you may ask them. Could also be that they simply changed the port.

redirection might be unnecessary, your script can 'act as this user' and open the register-page at f2o.org with the proper parameters and send back the result.
Post Reply