|Because, unlike many webhosts, we don't run MySQL on our web servers.. they all run on separate database servers (unless you have your own dedicated server of course).
Therefore, whenever you connect to MySQL, whether it be from the command line or a website, you have to specify the MySQL hostname you chose when creating your database. If you don't specify a hostname, or use "localhost", you'll end up trying connecting to your web server instead of the correct database server, and get an error like "Can't connect to local MySQL server through socket...".
What this means is, any time you see "localhost" in a script's database settings, you must change it to the MySQL hostname you set up (maybe something like mysql.yourdomain.com). Also, anytime you run the
mysql command line command, you're going to have to add a
-h mysql.yourdomain.com argument to it!
Last updated: Feb 15, 2005.