Solution for: #113: WordPress: "Error establishing a database connection"

define('DB_HOST', 'localhost:/tmp/mysql.sock');

1
Use define('DB_HOST', 'localhost:/tmp/mysql.sock'); instead of the standard 'localhost' setting.