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

后端 未结 3 1803
有刺的猬
有刺的猬 2021-02-04 17:48

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

3条回答
  •  迷失自我
    2021-02-04 18:24

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

提交回复
热议问题