Mysqldump command not found

前端 未结 7 2137
再見小時候
再見小時候 2020-12-31 01:36

I want to export my database and i am using this code:

mysqldump -p -u markazo_b markazo_b > /tmp/file.sql

But SSH show this error:

7条回答
  •  孤城傲影
    2020-12-31 02:02

    The solution I found is adding MySql's installation directory to PATH

    Steps:

    1. Find where MySql is installed
    2. Add the bin directory of MySql installation to PATH

    (In the terminal),

    locate mysqldump
    
    export PATH=$PATH:MY_SQL_INSTALLATION_DIRECTORY/bin
    

    MY_SQL_INSTALLATION_DIRECTORY is the directory you found by locate mysqldump: Example

    export PATH=$PATH:/usr/local/mysql-5.6.23-osx10.8-x86_64/bin
    

提交回复
热议问题