﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
14654	When WP_DEBUG, mysql socket error should be displayed	lloydbudd	westi	"When {{{WP_DEBUG}}}, mysql socket error should be displayed

Currently the standard ""Error establishing a database connection"" is displayed:

{{{
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
}}}

ENV: wp trunk r15511

REPRO [[br]]
To reproduce change {{{mysql.default_socket}}} to some nonsense path in {{{php.ini}}}

ADDITIONAL DETAILS [[br]]
Based on my WordCamp Genius Bar experiences this is a surprisingly common problem people have when setting up their local development environment. My Sept 2008 related post http://foolswisdom.com/mac-wordpress-error-establishing-a-database-connection/ still gets traffic and thank yous.

WORKAROUND [[br]]
Don't suppress the error condition on {{{mysql_connect()}}} in {{{wp-includes/wp-db.php}}}

{{{
-               $this->dbh = @mysql_connect( $dbhost, $dbuser, $dbpassword, true );
+               $this->dbh = mysql_connect( $dbhost, $dbuser, $dbpassword, true );
}}}"	enhancement	closed	low	3.1	Upgrade/Install	3.0.1	minor	fixed	has-patch	
