[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 09-16-2005, 01:26 AM   #1 (permalink)
Senior Member
 
JoshHendo's Avatar
 
Join Date: Apr 2005
Location: Australia
Posts: 1,099
48.40 NP$ (Donate)

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, 01:30 AM   #2 (permalink)
Senior Member
 
dgaussin's Avatar
 
Join Date: May 2004
Location: France
Posts: 1,294
85.60 NP$ (Donate)

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 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, 01:36 AM   #3 (permalink)
Senior Member
 
JoshHendo's Avatar
 
Join Date: Apr 2005
Location: Australia
Posts: 1,099
48.40 NP$ (Donate)

JoshHendo is a jewel in the roughJoshHendo is a jewel in the roughJoshHendo is a jewel in the rough


Quote:
Originally Posted by dgaussin
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...
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, 01:40 AM   #4 (permalink)
Senior Member
 
dgaussin's Avatar
 
Join Date: May 2004
Location: France
Posts: 1,294
85.60 NP$ (Donate)

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 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, 11:44 AM   #5 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
 
Join Date: Aug 2004
Posts: 3,794
47.60 NP$ (Donate)

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 09:46 PM
HOW TO: Use shell to control MySQL. abdulmueid Webmaster Tutorials 16 08-27-2005 08:17 AM
MySQL Database Tutorial - Adding a Username to a Database Veolus Webmaster Tutorials 7 08-26-2005 04:24 AM
Tutorial: Getting Started With MySQL (The Basics) deadserious Webmaster Tutorials 3 04-18-2004 01:17 PM

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 10:11 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85