469,642 Members | 1,197 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,642 developers. It's quick & easy.

connect to a remote DB

just started a cource in mysql using the mysql db on the instructers
server . Is it possable to to have a program on my server that can
access his db?

<?php
MYSQL_CONNECT("http://remotehost.com","db_name","pass_word")
OR DIE("Keine Verbindung zur Datenbank");
mysql_select_db("db")
or die("Didn't work again");
?>

thanks Paul
Jul 19 '05 #1
6 4653
jpaulb wrote:
just started a cource in mysql using the mysql db on the instructers
server . Is it possable to to have a program on my server that can
access his db?
Yes, but you need to allow connections from remote connection to his
server. You can do this for example with grant. See mysql documentation
for the syntax.
<?php
MYSQL_CONNECT("http://remotehost.com","db_name","pass_word")


I'm not sure can php fix that "http://" part, but I think it would be
better to use:
("remotehost.com","db_name","password")
Jul 19 '05 #2
jpaulb wrote:
just started a cource in mysql using the mysql db on the instructers
server . Is it possable to to have a program on my server that can
access his db?
Yes, but you need to allow connections from remote connection to his
server. You can do this for example with grant. See mysql documentation
for the syntax.
<?php
MYSQL_CONNECT("http://remotehost.com","db_name","pass_word")


I'm not sure can php fix that "http://" part, but I think it would be
better to use:
("remotehost.com","db_name","password")
Jul 19 '05 #3
jpaulb wrote:
just started a cource in mysql using the mysql db on the instructers
server . Is it possable to to have a program on my server that can
access his db?
Yes, but you need to allow connections from remote connection to his
server. You can do this for example with grant. See mysql documentation
for the syntax.
<?php
MYSQL_CONNECT("http://remotehost.com","db_name","pass_word")


I'm not sure can php fix that "http://" part, but I think it would be
better to use:
("remotehost.com","db_name","password")
Jul 19 '05 #4
Aggro wrote:
jpaulb wrote:
just started a cource in mysql using the mysql db on the instructers
server . Is it possable to to have a program on my server that can
access his db?

Yes, but you need to allow connections from remote connection to his
server. You can do this for example with grant. See mysql documentation
for the syntax.
<?php
MYSQL_CONNECT("http://remotehost.com","db_name","pass_word")

I'm not sure can php fix that "http://" part, but I think it would be
better to use:
("remotehost.com","db_name","password")

Thanks a lot for the help

Paul
Jul 19 '05 #5
Aggro wrote:
jpaulb wrote:
just started a cource in mysql using the mysql db on the instructers
server . Is it possable to to have a program on my server that can
access his db?

Yes, but you need to allow connections from remote connection to his
server. You can do this for example with grant. See mysql documentation
for the syntax.
<?php
MYSQL_CONNECT("http://remotehost.com","db_name","pass_word")

I'm not sure can php fix that "http://" part, but I think it would be
better to use:
("remotehost.com","db_name","password")

Thanks a lot for the help

Paul
Jul 19 '05 #6
Aggro wrote:
jpaulb wrote:
just started a cource in mysql using the mysql db on the instructers
server . Is it possable to to have a program on my server that can
access his db?

Yes, but you need to allow connections from remote connection to his
server. You can do this for example with grant. See mysql documentation
for the syntax.
<?php
MYSQL_CONNECT("http://remotehost.com","db_name","pass_word")

I'm not sure can php fix that "http://" part, but I think it would be
better to use:
("remotehost.com","db_name","password")

Thanks a lot for the help

Paul
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Burkhard Schultheis | last post: by
7 posts views Thread by Michi Henning | last post: by
5 posts views Thread by Mike L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.