env: mysql: No such file or directory after `wp import`

user2753924 picture user2753924 · Jun 8, 2017 · Viewed 7.2k times · Source

I'm trying to import a database locally using wp db import databasename.sql but I get the following error: env: mysql: No such file or directory. Can anyone tell me how to resolve this?

Answer

5tormTrooper picture 5tormTrooper · Jul 2, 2017

The above didn't help me. I fixed it by adding this to my .bash_profile:

export PATH=$PATH:/Applications/MAMP/Library/bin/