x10hosting [database help]

Got a kewl website or have a website question? Hosting? Servers?
Post Reply
darspire
Posts: 194
Joined: Sat Jul 25, 2009 9:21 pm

x10hosting [database help]

Post by darspire »

k so im using a new host its free its called x10hosting.com.

i have my database all created and all my codes, but when i go into register.php ( on the site) it says could not connect to db. im not sure what to put for localhost and what to put for the last set of "". please help
if you love something, let it go.
if it doesnt return.....hunt it down and kill it.
Gustava
Posts: 66
Joined: Tue Dec 29, 2009 5:49 am

Re: x10hosting [database help]

Post by Gustava »

Code: Select all

$db = mysql_connect("localhost", "root", "") or die("Could not connect.");
If you are running it off your computer just use localhost, and the password (Last set of " ") is blank unless you specifically change it.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: x10hosting [database help]

Post by Jackolantern »

Are you using the database on their host? If so, they have to give you the login info since of course they won't give you admin privileges. You have to request them to make you a database, and they will give you a login for it, likely with a long sequence of characters in it since it will be made by the system. If they have cPanel, there should be an option there to make one.

If you are trying to host the database yourself but have the site hosted with the webhost (probably not a good idea), you will have to have a static IP on your computer so that the web host can reach your computer at all times with one URL.
The indelible lord of tl;dr
Post Reply

Return to “WebSite”