1

I'm trying reindex latest Magento 2 using OSX 10.11 terminal with php bin/magento indexer:reindex command without success. Terminal returns same error on two red blocks.

enter image description here

– Maybe MYSQL socket problem?

ps. Magento2 is setup on MAMP PRO 3.

0

this is the same problem that is happening here:

MAMP Errors for Magento Command Line

With the solution being found here:

https://stackoverflow.com/questions/4262006/how-to-use-mamps-version-of-php-instead-of-the-default-on-osx#answer-26561760

I just had to put this line in my .bash_profile. If you don't have one, just make one under your user.

vi ~/.bash_profile

And then add in this line, paying attention to the version of php that you are running.

# MAMP PHP
export MAMP_PHP=/Applications/MAMP/bin/php/php7.0.22/bin
export PATH="$MAMP_PHP:$PATH"
0

If you are using mamp go to the root directory where Magento is installed and type php in front of the command.
ex:

php bin/magento cache:clean
-1

first command: php bin/magento cache:flush

second command: php bin/magento indexer:reindex

working 100%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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