Skip to content

Instantly share code, notes, and snippets.

@yratof
Created June 29, 2015 15:30
Show Gist options
  • Save yratof/c3295a5bbf68641884c6 to your computer and use it in GitHub Desktop.
Save yratof/c3295a5bbf68641884c6 to your computer and use it in GitHub Desktop.
MySQL Fix for MAMP PRO when using WP CLI
sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/local/bin/mysql;
sudo ln -s /Applications/MAMP/Library/bin/mysqlcheck /usr/local/bin/mysqlcheck;
sudo ln -s /Applications/MAMP/Library/bin/mysqldump /usr/local/bin/mysqldump
@montrealist
Copy link

The following fixed the issue for me on a server:

sudo ln -s /usr/bin/mysql /usr/local/bin/mysql; 
sudo ln -s /usr/bin/mysqlcheck /usr/local/bin/mysqlcheck; 
sudo ln -s /usr/bin/mysqldump /usr/local/bin/mysqldump;

@unclemimo
Copy link

Didn't worked for me.

WP-CLI 1.4.1 and MAMP 4.1.1. Mac Os High Sierra

@yratof
Copy link
Author

yratof commented Jul 4, 2018

Try using this as the database host: localhost:/tmp/mysql.sock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment