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 mysql Database

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 09-16-2005, 02:26 AM THREAD STARTER               #1 (permalink)
Senior Member
 
JoshHendo's Avatar
Join Date: Apr 2005
Location: Australia
Posts: 1,092
JoshHendo is a jewel in the roughJoshHendo is a jewel in the roughJoshHendo is a jewel in the rough
 



mysql Database


I want to connect to a database that is not on my server. What would I put insted of localhost, or what code should i put if it isn't the same as usual. (For PHP)
__________________
:bingo: :kickass: :lala: :notme: :great: :gn:
JoshHendo is offline  
Old 09-16-2005, 02:30 AM   #2 (permalink)
Senior Member
 
dgaussin's Avatar
Join Date: May 2004
Location: France
Posts: 1,226
dgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to behold
 




Replace localhost with the database server IP address.

And you'll have to authorize remote connexion on the database server for your web server too...
dgaussin is offline  
Old 09-16-2005, 02:36 AM THREAD STARTER               #3 (permalink)
Senior Member
 
JoshHendo's Avatar
Join Date: Apr 2005
Location: Australia
Posts: 1,092
JoshHendo is a jewel in the roughJoshHendo is a jewel in the roughJoshHendo is a jewel in the rough
 



Originally Posted by dgaussin
Replace localhost with the database server IP address.
????: NamePros.com http://www.namepros.com/programming/124131-mysql-database.html

And you'll have to authorize remote connexion on the database server for your web server too...
this is what i get when i put in the IP address :

Parse error: parse error, unexpected T_DNUMBER in /home/xvsxpne/public_html/php/dn2/install/finish.php on line 21
__________________
:bingo: :kickass: :lala: :notme: :great: :gn:
JoshHendo is offline  
Old 09-16-2005, 02:40 AM   #4 (permalink)
Senior Member
 
dgaussin's Avatar
Join Date: May 2004
Location: France
Posts: 1,226
dgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to behold
 




It's a PHP syntax error you have here, not mysql related.
Did you quote the IP address ie. '127.0.0.1' ? Check your code syntax anyway.
dgaussin is offline  
Old 09-17-2005, 12:44 PM   #5 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,809
stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of
 



You can also put the domain name instead of the ip address (since the domain just resolves to an IP address).

Let me know if you need anything else, Josh.

-Steve
stscac 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
Tutorial: How to Install Apache2 MySQL and PHP on Windows deadserious Webmaster Tutorials 35 09-21-2005 10:46 PM
HOW TO: Use shell to control MySQL. abdulmueid Webmaster Tutorials 16 08-27-2005 09:17 AM
MySQL Database Tutorial - Adding a Username to a Database Veolus Webmaster Tutorials 7 08-26-2005 05:24 AM
Tutorial: Getting Started With MySQL (The Basics) deadserious Webmaster Tutorials 3 04-18-2004 02:17 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 11:47 AM.

Managed Web Hosting by Liquid Web
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