1

I'm trying to install drush on my local macbook. Drupal runs fine but when I try to run drush from cli:

jackBook:drupal-7 jack$ drush status

I'm getting the following response in the cli:

<h1>Additional uncaught exception thrown while handling exception.</h1>
<h2>Original</h2>
<p>PDOException: SQLSTATE[HY000] [2002] Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/Applications/MAMP/tmp/mysql/mysql.sock&amp;#039; (2) in drupal_is_denied() (line 1847 of /Users/jack/Sites/drupal-7/includes/bootstrap.inc).</p>
<h2>Additional</h2>
<p>PDOException: SQLSTATE[HY000] [2002] Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/Applications/MAMP/tmp/mysql/mysql.sock&amp;#039; (2) in system_list() (line 165 of /Users/jack/Sites/drupal-7/includes/module.inc).</p>
<hr />
Drush command terminated abnormally due to an unrecoverable error.

what did I do wrong?

I followed these steps: http://drupal.org/node/508450#comment-2352240

  1. Download drush.tar.gz to your desktop (or wherever)

  2. Jump across to the Terminal cd ~/Desktop

  3. Extract it with tar -zxf drush.tar.gz

  4. Move it to /usr/local/lib sudo mv drush /usr/local/lib/

  5. Make it executable sudo chmod u+x /usr/local/lib/drush/drush

  6. Then stick it in /usr/bin/ so that you can run it from anywhere sudo ln -s /usr/local/lib/drush/drush /usr/bin/drush

And added alias drush='/path/to/drush/drush' to my .profile

phpinfo file:

jackBook:php jack$ php -i

phpinfo

as you can see pdo is enabled for mysql / mysqllite (if that is somewhat related and I'm not wrong )

Browse other questions tagged or ask your own question.