Drush was not able to start (bootstrap) the Drupal database

Solapas principales

The usual workaround suggested is to change the 'host' setting in your settings.php. Before the change, it looks something like this (in D7: D6 is analogous but uses $db_url = 'mysql://username:password@localhost/databasename';):

$databases = array (
[...]
      'database' => 'yourdatabase',
      'username' => 'yourusername',
      'password' => 'yourpassword',
      'host' => 'localhost',
[...]

MySQL treats 'localhost' specially, and uses the Unix socket instead of a network socket. If you change the 'host' to 127.0.0.1:

'host' => '127.0.0.1'

a continuación, MySQL siempre utiliza un socket de red, y drush funcionará. Sin embargo, esta no es la mejor idea, porque es más eficiente utilizar el socket de Unix (que he visto puntos de referencia de 6-10% más rápido).