If you’re receiving the following error whilst trying to run the Magento indexes from Terminal

This is because the Zend framework cannot locate the socket for the PDO connection. To fix this we’re going to create an alias of the MAMP’s MySQL socket.

Run the following code in Terminal

Now you should be able to run the indexes. Check out this post to learn about which indexes to run.

Dave Macaulay
Dave Macaulay
I'm an enthusiastic, slightly eccentric Magento developer who bores with the idea of another basic brief.