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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I resolved this by changing my $PATH, run this in command or update your .bash_profile
:
export PATH=$PATH:/usr/local/mysql/bin
回答2:
The above didn't help me. I fixed it by adding this to my .bash_profile
:
export PATH=$PATH:/Applications/MAMP/Library/bin/