There are upcoming maintenance events which may impact our services. Learn more

Unable to run Magento commands via CLI Print

  • 0

Problem Description

  • You wish to run Magento commands via CLI
  • When you run a command like php -d memory_limit=1G bin/magento setup:upgrade it results in an SQL error: SQLSTATE[HY000] [2002] No such file or directory

Problem Resolution

Open the file app/etc/env.php and change the db => connection => default => host value from 'localhost' to '127.0.0.1'

Save the file, and attempt your command again.


Was this answer helpful?

← Back