After Snow Leopard can't connect to remote db

I have several wordpress sites that I have setup locally to use the remote mysql db. This helps avoid duplication in your testing and production environments.
Since upgrading to Snow Leopard the ability to connect to remote dbs has been obliterated. I found an explanation on stack over flow:

"I have resolved this. The issue indeed was due to Snow Leopard’s default of using mysqlnd as the module for PHP 5.3 it ships with, not with Dreamhost. That module flatly refuses to connect with servers using OLD_PASSWORD hash.

The only solution to this (as I can’t change MySQL settings on shared hosting) is to recompile your own PHP, that will not use mysqlnd but mysql/mysqli."

I am asking here to see if anyone else has had this problem and foudn an easier solution than recompiling php.

At the present time, this is the only solution available. Sorry for the inconvenience.

Any chance Dreamhost could be persuaded to stop specifying OLD_PASSWORD in the MySQL config?

Not yet. We still have some users using older applications that may not support the newer password format – using the newer password format would end up locking them out of their databases.

Apple don’t offer drop-in modules?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost

Since the last message on this thread is over a year old, I’d like to ask if there’s been any change on DH’s end or if I should still use the linked StackOverflow post to get this working. Anyone?

We’ve since switched to a newer version of MySQL and switched things to the new password format. You shouldn’t need to do anything extra anymore.

Thanks very much for the quick reply, then!

Finally getting a chance to try this and it’s failing to connect to the DB… Here’s what I’ve done:

  1. copied the entire contents of the site (WordPress is installed at the public root) to ~/Sites/mySite/
  2. modified the local version of wp-config to include:
    define(‘WP_HOME’, ‘http://localhost/~myUserName/mySite/’);
    define(‘WP_SITEURL’, ‘http://localhost/~myUserName/mySite/’);
    define(‘WP_DEBUG’, true); // enable debugging mode

When I try to hit http://localhost/~myUserName/mySite/ in a browser, I get the WordPress DB connection error screen:

Error establishing a database connection
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 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?

I haven’t changed the DB_HOST value:

define(‘DB_HOST’, ‘’);

Do I need to change that to get it working? The production site is still running fine, so I know the db server isn’t down. I can successfully ping from Terminal.

Chances are that your MySQL user isn’t set to allow connections from your home IP - by default, it only allows connections from DreamHost servers. Head over to the MySQL section of the Panel (, click the name of the user you’re using to connect, and add your home IP in the box at the bottom.

Thanks! Should’ve been obvious, I guess.