If you’ve installed WordPress on a Linux server in the past, you’re probably amazed at how easy it is. Then, when you get a client who ask you to install WordPress on a Windows-based GoDaddy hosting account, you get the dreaded “Error establishing a database connection” message. I wrangled with this problem for about 20 minutes tonight. Here’s a possible fix if you happen to encounter the error: change the “localhost” setting in your WP-Config file to the actual location of your database. Not sure how to do that?
1) Login to your GoDaddy account.
2) Click “My Account” in the top right.
3) Scroll down to “My Products” and click “Web Hosting.”
4) Launch your “Hosting Control Panel.”
5) Click “Databases/MySQL” from the tabs at the top of the hosting control panel.
6) In the “Action” column, click the small pencil symbol.
7) You should now see a field titled “Host Name.” Copy the string, which will look something like this: “abc.db.9999999.hostedresource.com”
8) Open your WP-Config file.
9) Scroll down to “/** MySQL hostname */” and paste in your “host name” like so:
define(‘DB_HOST’, ‘abc.db.9999999.hostedresource.com’);
10) Upload the modified WP-Config file back to your server and visit “http://NameOfYourSite.com/wp-admin/install.php” Hopefully your wordpress blog will now be up and running!
After you’ve gotten your blog installed, you may want to verify that your GoDaddy file permissions are set up properly for your WordPress blog.
[...] get WordPress installed on your GoDaddy server (hopefully you didn’t get the dreaded “GoDaddy WordPress database error“), you’ll probably run into file permissions errors. To fix the problem, you need to [...]