when i what to enable module using drush I'm getting this error
Im using mamp pro 3 and php 5.5.10
<h1>Additional uncaught exception thrown while handling exception.</h1
<h2>Original</h2>
<p>PDOException: SQLSTATE[HY000] [2002] Socket operation on non-socket
in drupal_is_denied() (line 1933 of /Users/edinpuzic/desktop/projekti/studiotnt
/includes/bootstrap.inc).</p>
<h2>Additional</h2>
<p>PDOException: SQLSTATE[HY000] [2002] Socket operation on non-socket
in _registry_check_code() (line 3185 of /Users/edinpuzic/desktop/projekti/studiotnt
/includes/bootstrap.inc).</p>
<hr />Drush command terminated abnormally due to an unrecoverable error. [error]
I had the same issue, after poking around I've figured out that te sock files was:
/private/tmp/mysql.sock
not
/var/mysql/mysql.sock
In this case I did:
cd /var
sudo mkdir mysql
cd mysql
sudo ln -s /private/tmp/mysql.sock mysql.sock