I ran into this problem as well, and there’s another workaround:
In your wp-config.php file:
define(‘DB_HOST’, ‘localhost:/tmp/mysql.sock’); // 99% chance you won’t need to change this value
Instead of just localhost. For those of you savvy php coders:
in wp-db.php, they pretty much just suck those values and pass them to mysql_connect(), so you can use a number of connection strings there for your db. These include
[localhost]:/path/to/socket
and
ip_address:port
Refer to the PHP documentation for more info.