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

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


I resolved this by changing my $PATH, run this in command or update your .bash_profile:

export PATH=$PATH:/usr/local/mysql/bin


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

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


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).