If you are working on installing WordPress on an ICDSoft hosted website and are carefully following the steps of the 5 minute installation, you will have no doubt run into a Cannot Connect to Database error.
If you have indeed followed all of the instructions up to this point, you would have created a MYSQL database and ensured the user of this database has sufficient access privileges. The reason you are seeing this error is because the path to the Database host on ICDSoft is not the standard path suggested by WordPress.
Ironically, in earlier version of the wp-config file, there is a comment beside the DB_HOST field that says there is a 99% chance you won’t need to change this value. Well, ICDSoft users fall into the 1% category that will have to change this value. The code from the wp-config file is displayed below:
// ** MySQL settings ** //
define(‘DB_NAME’, ‘database_name’); // The name of the database
define(‘DB_USER’, ‘username’); // Your MySQL username
define(‘DB_PASSWORD’, ‘password’); // …and password
define(‘DB_HOST’, ‘localhost:/tmp/mysql5.sock‘); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);
As highlighted in bold, the correct path for the DB_HOST is not localhost, it’s localhost:/tmp/mysql5.sock
Add this to your config file, revisit wp-admin/install.php and you are good to go!
Here’s a promo code for 20% your hosting package if you want: http://www.icdsoft.com/promo-code/ICDsoft20
Tags: database, error, icdsoft, installation, MYSQL, wordpress











June 3rd, 2010 at 9:42 am
You are a f***ing genius!! Been trying for 2 hours to set up my wordpress on my server but just wasn’t happening.
Great that icdsoft falls into that 1% category :-s
Thanks Neil
June 3rd, 2010 at 9:51 am
Oops, i thought it worked, which it did, except i cant see any styles… Neither can i open /wp-admin
Any ideas Neil?
Thanks
June 3rd, 2010 at 2:01 pm
@Daniel Hey, glad to help! What do you mean by styles? Have you completed the install process?
June 7th, 2010 at 7:15 am
It’s working now Neil, thanks again for your help.
August 24th, 2010 at 12:55 pm
Thanks for this AWESOME tip! You ROCK! =)
December 13th, 2010 at 9:03 pm
wow, thanks so much!!!
February 11th, 2011 at 10:15 am
Thank you for posting this! You saved me loads of time and I really appreciate it.
April 22nd, 2012 at 10:23 am
Nice job sir. Was just going to setup a WordPress site for the first time and knpowing how many quirks I’ve had with Perl scripts, phpAutoMembersArea and the like I thought I’d check for comments. Yours was at the top of the list.
ICDSoft support is fantastic btw and I’ve never had a problem not getting assistance but this was a nice upfront answer ahead of time.
Thanks!
April 22nd, 2012 at 8:21 pm
@David North Glad you found this helpful! I agree with you on support. I’ve found ICDSoft support always helpful and quick!