Help - Search - Members - Calendar
Full Version: Quick MySQL question
The Planet Forums > System Administration > Web Hosting
damainman
Okay, i know this might be a easy question but i always like to double check lol.

If i only have one server.. and someone asked me what is the MySQL server/host name.

it would be:

hostname.mydomain.com correct??
ffeingol
damainman,

Under most setups, your clients would specify "localhost" (wouthout the quotes) as the hostname for mysql.

Frank
damainman
Yes but what if they are trying to contact the database from another location?
clearsignal
Yeah, if they are accessing from another location it would be the domain of the server (or I believe any other hosted domain on there as well). If they are accessing locally it's localhost.

If you are using cpanel, make sure you allow external connections to mysql, I believe it's disabled by default.

Cheers
damainman
Thanks for the replies icon_smile.gif

So its not the hostname? just the domain name correct?

domain.com

not

servername.domain.com
Paul
It can be any domain on the server. So if the domain they have hosted with you is bleh.net, then they would externally connect to mysql using bleh.net as the hostname. (if they are connecting from a script on the server, use localhost, it's quicker and less likely to go wrong)

As said before, make sure you enable external access for the users IP and make sure port 3306 isn't blocked by your firewall.

Post 1337 icon_mrgreen.gif
damainman
You think enabling external connections would create a secruity risk? Do you have it enabled or disabled?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.