Hi All,
i need 2 connect with a remote mySQL database......can any1 help me doin this....
advance thx 2 all
----------
Saadi
----------
how can we connect 2 a remote mySQL Database
Moderator: General Moderators
-
saadatshah
- Forum Newbie
- Posts: 23
- Joined: Fri Jul 05, 2002 5:50 am
- Location: Lahore
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
The same way that you connect to a local one using mysql_connect() except the host name will be something other than localhost, it will be the name of the remote mysql server (or its IP address).
To connect to a remote server, your IP address or domain has to be given the right to connect under your username and password.
Mac
To connect to a remote server, your IP address or domain has to be given the right to connect under your username and password.
Mac
So like this:-
Code: Select all
<?php
mysql_connect("www.remotehost.com","root","123");
?>