Get wp-cli running with MAMP

I got really intrigued with the wp-cli tool for command line WordPress (seriously awesome, check it out)… however I haven’t switched my osx machine to use the built in php and mysql so I kept getting this error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Easy fix:

sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock

And BOOM! I’ve got wp-cli working now.

Published by

Darren

My name is Darren Ethier. I'm the owner of roughsmootheng.in. I'm the father of four children and husband of the most beautiful woman in the world. My passion is technology and it's strategic use in ministry. I also love anything to do with leadership and the wise use of words. I'm also the developer of the popular WordPress plugin Organize Series. Since THAT'S not enough to keep me busy I also work as a core developer for a great plugin called Event Espresso

Leave a Reply

Your email address will not be published. Required fields are marked *