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
For anyone running Desktop Server, which uses XAMPP, your command that needs to be added to .bash_profile
with the following command is:
export PATH=$PATH:/Applications/XAMPP/xamppfiles/bin
Once you add that, you should be able to use wp db import
(and not needing to use the wp-cli portal the Desktop Server provides; which wasn't working consistently for me).
The above didn't help me. I fixed it by adding this to my .bash_profile
:
export PATH=$PATH:/Applications/MAMP/Library/bin/
I resolved this by changing my $PATH, run this in command or update your .bash_profile
:
export PATH=$PATH:/usr/local/mysql/bin