NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page connecting to a host that isn't localhost

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
3 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 06-16-2005, 07:46 PM THREAD STARTER               #1 (permalink)
New Member
Join Date: Jun 2005
Location: Paradise, CA
Posts: 11
visionofdesign is an unknown quantity at this point
 



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
visionofdesign is offline  
Old 06-16-2005, 08:07 PM   #2 (permalink)
NamePros Regular
Join Date: Oct 2003
Location: Sweden
Posts: 395
cerebus has a spectacular aura aboutcerebus has a spectacular aura about
 


Animal Rescue Wildlife Animal Cruelty
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).
cerebus is offline  
Old 06-16-2005, 08:56 PM THREAD STARTER               #3 (permalink)
New Member
Join Date: Jun 2005
Location: Paradise, CA
Posts: 11
visionofdesign is an unknown quantity at this point
 



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.
visionofdesign is offline  
Closed Thread


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

 
All times are GMT -7. The time now is 12:32 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger