Site5 - Built For Designers & Developers MENU

What is the “host” for my SQL databases?

[11 Grey Star Level]

How do I find the hostname that I need to specify for a PHP script to access my mySQL databases?

Answer #1

For most if not all site5 servers the hostname for your mysql settings is “localhost”

Answers Answered By: Giovanni Madari [4 Grey Star Level]

Answer #2

it is localhost

Answers Answered By: braindance [7 Grey Star Level]

Answer #3

You should use “localhost” without the quotes as the MySQL host name.

Answers Answered By: Kyle Ross [9 Grey Star Level]

Answer #4

Set it to localhost

Answers Answered By: david [10 Grey Star Level]

Answer #5

I had tried the obvious answer (“localhost”) before posting to the KB.

Several contributors confirmed that answer is correct (Giovanni, nomore340, Kyle Ross and David). Thank you.

I can, after finding I had a masked error in the live code (since fixed), confirm that this works.

[Aside] I’m not trying to gyp people out of “Star Points” for their answers, it’s just that I cannot approve answers. I have submitted a trouble ticket about this problem.

Answers Answered By: JRG [11 Grey Star Level]

Answer #6

Correct, you should be using “localhost” as you would be connecting to the database server which is on the same server that your website is hosted on.

Answers Answered By: gmcmillan [38 Green Star Level]

Answer this Question

You must be Logged In to post an Answer.

Not a member yet? Sign Up Now »

Money Back Guarantees
Click to verify BBB accreditation and to see a BBB report.