Fatal error: Connecting to MySQL server 'localhost' failed.

You get more information about the problem in our knowledge base: http://www.woltlab.com/help/?code=2002

Information:

error message: Connecting to MySQL server 'localhost' failed.
error code: 2002
sql type: MySQLDatabase
sql error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
sql error number: 2002
sql version:
file: /sims3/wcf/lib/system/database/MySQLDatabase.class.php (29)
php version: 5.4.4-14
wcf version: 1.0.11 pl 3 (Horizon)
date: Mon, 20 May 2013 07:39:42 +0000
request: /forum/index.php?page=Thread&threadID=1028
referer:

Stacktrace:

#0 /sims3/wcf/lib/system/database/Database.class.php(76): MySQLDatabase->connect()
#1 /sims3/wcf/lib/system/WCF.class.php(270): Database->__construct(...)
#2 /sims3/wcf/lib/system/WCF.class.php(88): WCF->initDB()
#3 /sims3/forum/global.php(18): WCF->__construct()
#4 /sims3/forum/index.php(7): require_once('/sims3/forum/gl...')
#5 {main}