| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| New Member Join Date: Jun 2005 Location: Paradise, CA
Posts: 11
![]() | connecting to a host that isn't localhost I have been working with mysql for about a year now, and I have never needed, until today, to connect to a database on a seperate server than the one I am running my php scripts on. Can anybody tell me what I have to put into the host argument of mysql_connect() to connect to a different server?
__________________ -Luke |
| |
| | #2 (permalink) |
| NamePros Regular Join Date: Oct 2003 Location: Sweden
Posts: 395
![]() ![]() | With a normal setup all you need to do is to give the hostname or IP of the MySQL server as the first argument. Also be sure that you are allowed to connect to the remote server by adding the host you are connecting from for the user (or % to allow any host). |
| |
| | THREAD STARTER #3 (permalink) |
| New Member Join Date: Jun 2005 Location: Paradise, CA
Posts: 11
![]() | Thanks, so I would set up the other server to let my server connect to it? would it be something like somebody@sumatra.globat.com or just sumatra.globat.com?
__________________ -Luke
Last edited by visionofdesign; 06-16-2005 at 09:00 PM.
|
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Do you want to change to a new host? | priyanka[imported] | Web Hosting Discussion | 3 | 04-19-2005 09:14 AM |
| How To: Selecting a Good Host | Avoiding the Bad | virtuoso | Web Hosting Discussion | 1 | 03-10-2005 12:22 PM |
| Host Saints - Not too Good to be True | BLazeD | Web Hosting Offers | 1 | 06-12-2004 05:15 PM |
| Free, Brand New Hosting Research Tool; The Host Report.com | mdurrant | Free Resources | 6 | 03-29-2004 12:11 AM |