Hi ,
I have installed magento community v2.0.6 on MAMP environment.
I am unable to execute the magento reindex command due to the following error.
Zend_Db_Adapter_Exception]
SQLSTATE[HY000] [2002] No such file or directory
[PDOException]
SQLSTATE[HY000] [2002] No such file or directory
indexer:reindex [index1] ... [indexN]
I have extensively tried to fix the above bug on internet but couldn't figure it out.
Could you pls help in resolving this issue. Many thanks in advance.
Solved! Go to Solution.
Hello livastar,
Did you create your custom module with setup Schema?
Please disable that and cheek once.
or try this one http://www.johnshipp.com/php-artisan-migrate-laravel-5-pdoexception-sqlstatehy000-2002-no-such-file-...
Still have problem then try to reinstall magento.
Thanks.
Hello Livastar,
Goto the Magento Installed root directory. Provide the appropriate permission to the bin/magento file,
then execute following command from root directory:
1. php bin/magento indexer:reindex
or
go inside the bin directory
cd bin
2. for indexer use the following command
php magento indexer:reindex
for cleaning cache:
php magento cache:clean
for compile:
php magento setup:di:compile
for setup upgrade:
php magento setup:upgrade
Hi,
Thanks for your reply. However after execution permission were given experiencing the same issue. I am not sure whether it is about permissions settings ?
Thanks in advance
Hello livastar,
Did you create your custom module with setup Schema?
Please disable that and cheek once.
or try this one http://www.johnshipp.com/php-artisan-migrate-laravel-5-pdoexception-sqlstatehy000-2002-no-such-file-...
Still have problem then try to reinstall magento.
Thanks.
Thanks for your response.
Followed the shared link and the commands are executing fine.
Thanks.
Hello
I checked the provided link/solution. But, where in the Magento installation did you made this change? Or is it a setting in MAMP?
Best,
Magnus
Have you found a solution? I can't find the file neither.
best regards David
Change from DB_HOST = localhost to DB_HOST = 127.0.0.1 in app/etc/.env and try by clearing the cache.
I have solved the problem this way. Thanks!