- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Executing command php magento indexer:reindex from bin directory of root directory
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Executing command php magento indexer:reindex from bin directory of root directory
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Executing command php magento indexer:reindex from bin directory of root directory
Thanks for your response.
Followed the shared link and the commands are executing fine.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Executing command php magento indexer:reindex from bin directory of root directory
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Executing command php magento indexer:reindex from bin directory of root directory
Have you found a solution? I can't find the file neither.
best regards David
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a workaround.
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!