当“localhost”在我的设置中时,我无法使用“drush status”。如果我切换到“127.0.0.1”,Drush状态正常,但连接不正确;加载端口会挂起它。我使用的是MAMP Pro 3,它更喜欢“localhost”和端口8889。如果我使用IP版本,MAMP会抛出PDO异常(或超时,取决于我是否添加端口)。
如何配置MAMP 3与Drush一起工作?
除了MAMP版本,我的问题与
Drush enable error
和
Drush install on local server error (Command pm-enable needs a higher bootstrap level)
。我已经创建了这里推荐的符号链接,但我不确定MAMP是否使用/var路径。
我的错误是:
<h1>Additional uncaught exception thrown while handling exception.</h1>
<h2>Original</h2><p>PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_is_denied()
(line 1921 of /Users/mypath/includes/bootstrap.inc).</p><h2>Additional</h2><p>PDOException: SQLSTATE[HY000] [2002]
No such file or directory in _registry_check_code() (line 3194 of /Users/mypath/includes/bootstrap.inc).</p>
<hr />Drush command terminated abnormally due to an unrecoverable error.
[error]