Troubleshooting the "Drush was not able to start (bootstrap) the Drupal database." when trying to run in on a localhost configuration.
Many thanks to Chris Wells from Redfin Solutions for this troubleshooting tip on getting drush to work in a localhost configuration.
In the settings.php file, try changing
$db_url = 'mysqli://username@localhost/example';
$db_prefix = '';
to
$db_url = 'mysqli://username@127.0.0.1/example';
$db_prefix = '';
comment #12 http://drupal.org/node/502252