Connect to a database in another web site ...

A

Anonymous

Guest
HI all

I want to connect to a database in another web site,
normally I use [localhost] as db host,
what kind of address should I use to connect
to the mentioned database?

Cheers
 
You write computers network identification number or name to connect the database of pther site. It works only if you have access permission.
 
you are actually writing an IP address or a domain name that is connected to that webpage. You will need the rights to acces the server, alteas the read rights.
 
WHat do you mean by readin or writing permission.
well that is my own database and I have username and password for that.
Can it be a permission or do we need any special permission
to read the database from outside the site?

For example think our web site is called (http://www.mywebsite.com)
Should we use this address (or its IP address) for HOST or should
we use the server address (or IP) to connect to database?

Whenever I connect to mySQL on that server the address bar is
something like this:

Code:
http://86.28.54.9/phpmyadmin/index.php?lang=en-iso-8859-1&server=1

so should I use http://86.28.54.9 as host address?

Ive heard that we need to connect to a special port which is 3306 and it should be open if you want to access to the database from another server. Well Ive asked my host provider and they told me this port is open and I can use it. DO we have to use that port and HOW?

so could anybody please give me some code which I can connect to database with these information?

Thanx
 
you use that ip that you posted... you dont need any more permosions.. you have access to it...

mysql_connect("83.150.64.234","test","test");
 
Back
Top