icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » hostname?

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old August 3rd, 2004, 3:47 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2004
2 posts
Gave thanks: 0
Thanked 0 times
hostname?

I created a mySQL database using phpMyAdmin, and am trying to create a form for inputting data into the database using phpFormGenerator. I think I know what I'm doing, except when phpFormGenerator asks for the mySQL database access information. What hostname should I enter?

Forgive me if this is a stupid question.
ImplicitDesign is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 3rd, 2004, 4:47 PM   #2 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2004
2 posts
Gave thanks: 0
Thanked 0 times
Never mind. localhost was the hostname.
ImplicitDesign is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 3rd, 2004, 7:36 PM   #3 (permalink)
Surpass Fan
Comfy Contributor
 
Jamie's Avatar
 
Joined in Oct 2003
Hosted on Dedicated
297 posts
Gave thanks: 0
Thanked 0 times
Ooooh, I was SO about to answer that one too. No really, it's like the only question in weeks I've known the answer to. lol
__________________
Jme
++++++
Site: WalkerNetwork.com
My Dumb Blog
Server: Dedicated
IM: Visit my profile for more info.
Official Title: Queen of Run-On Sentences

[ONE] - The Campaign to Make Poverty History
Jamie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 3rd, 2004, 8:16 PM   #4 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
Yep, localhost works. Otherwise you can use 127.0.0.1
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 3rd, 2004, 8:22 PM   #5 (permalink)
Hostering?
Excelling Contributor
 
mobius's Avatar
 
Joined in Jan 2004
Lives in New York
Hosted on D41
970 posts
Gave thanks: 0
Thanked 0 times
What is 127.0.0.1 ?
__________________
{_DIME.41 Reseller_}

Stay cool.

>> Avatar used with permission from garyzullo.com <<
mobius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 3rd, 2004, 8:43 PM   #6 (permalink)
Registered User
Seasoned Poster
 
NirTivAal's Avatar
 
Joined in Nov 2003
80 posts
Gave thanks: 0
Thanked 0 times
A self referring IP address.
NirTivAal is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 3rd, 2004, 9:09 PM   #7 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
Yep, it's used to connect to your own computer. It's actually safer to use it rather than localhost. I *believe* localhost is in the host files, and if for some reason is removed it could cause it to not work. I'm really not positive on that one.. so don't quote me on it.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 3rd, 2004, 10:58 PM   #8 (permalink)
sam
Surpass Fan
Super #1
 
sam's Avatar
 
Joined in Dec 2003
Lives in NJ
5,057 posts
Gave thanks: 0
Thanked 4 times
always use localhost for your connections to mySQL dbs at surpass.

avoid putting IP addresses in your code. your account may have to move someday.

if you're running mysql /apache/ php on your home computer - you can still use localhost instead of an IP address.
sam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old August 3rd, 2004, 11:29 PM   #9 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,092 posts
Gave thanks: 48
Thanked 131 times
Yep, most certainly use localhost where you can. Was just meaning that when it doesn't work it's always safe to try the 127.0.0.1

I remember a client of mine before, for some reason their server could not use localhost and we had to change all mySQL connections to 127.0.0.1 for them to work. Didn't understand why, but I've always remembered to try that if I have problems with localhost.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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