View Single Post
  #10 (permalink)  
Old 16-01-2008, 11:00 PM
flick's Avatar
flick flick is offline
official g33k ®
 
Join Date: Aug 2007
Location: Manchester
Gender: Female
Posts: 2,187
Default

Quote:
Originally Posted by LeadMagnet View Post
No, that's not true. It makes very little sense to have the database and the website on different hosts in your case, but it can be easily done.


in the following code (which he will have used in his php to connect to the mysql database)
Code:
$db = mysql_connect("localhost","username","password");
all he has to do is replace "localhost" with the address of the database. It's that simple. Ok, i've never tried it, but it SHOULD be that simple.

My hosting service is with http://www.exitblue.com/ It's perfect for what i want, quite cheap, all the bells and whistles come pre-installed and setup for you and the clincher is that the support is top-notch.
that's exactly right, as long as you are connecting with a user that has permissions on the db it wil work. also check that the mysql port is open to external servers (it may well not be) if it isn't the hosting provider might be able to offer you another port to use. they do this to prevent hackers getting in via default ports. :)
__________________

Reply With Quote