enter image description here

error when command php bin/magento indexer:reindex

php version : 7.3.14

magento : 2.3.4

2 Answers 2


you have few issues with mysql, 1 - mysql is not running / crashed 2 - socket / address path is wrong / missing

please check your configuration file env.php and also mysq is running and listening on localhost, for example.


In your


find if'host' => '' change it to 'host' => 'localhost'


find if'host' => 'localhost' change it to 'host' => ''

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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