1

After installing Drupal 8 (via installation wizard), trying to run any drush command, getting below error:

drush en views_ui
PDOException: SQLSTATE[HY000] [2002] No such file or directory in core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php on line 79 Drush command terminated abnormally due to an unrecoverable error.

Drupal version: 8.2.x

Drush version: 8.1-dev

marked as duplicate by kiamlaluno Jun 18 '16 at 21:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

10

Make sure your database host setting is 127.0.0.1 instead of localhost.

  • 1
    This is a DB connection issue. I faced this while DB server was down. Before replacing 'localhost', better check your DB connection is working – augusto Oct 5 '18 at 9:05
  • Also, it is worth to check file permissions since I didn't check the symlink I had used and the original file used r-xr-xr-x (555). Changed to 755 and this error was fixed. Would be nice if a better, more specific error would be logged by Drupal. – Gugols May 20 at 22:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.