[wp-trac] [WordPress Trac] #14654: When WP_DEBUG, mysql socket error should be displayed
WordPress Trac
wp-trac at lists.automattic.com
Fri Aug 20 06:47:57 UTC 2010
#14654: When WP_DEBUG, mysql socket error should be displayed
-----------------------------+----------------------------------------------
Reporter: lloydbudd | Owner:
Type: enhancement | Status: new
Priority: low | Milestone: Awaiting Review
Component: Upgrade/Install | Version:
Severity: minor | Keywords:
-----------------------------+----------------------------------------------
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 );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14654>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list