Mysql command not found in OS X 10.7

前端 未结 15 2143
臣服心动
臣服心动 2020-12-02 04:06

I cant get my mysql to start on os x 10.7. It is located in /usr/local/mysql/bin/mysql

I get command not found when I type mysql --version

相关标签:
15条回答
  • 2020-12-02 04:34

    I had same issue after installing mariadb via HomeBrew, brew doctor suggested to run brew link mariadb - which fixed the issue.

    0 讨论(0)
  • 2020-12-02 04:36

    I faced the same issue, and finally i got a solution. Please go through with the below steps, if you are using MAMP.

    1. Start MAMP or MAMP PRO
    2. Start the server
    3. Open Terminal (Applications -> Utilities)
    4. Type in: (one line) 
 /Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot

    This works for me.

    0 讨论(0)
  • 2020-12-02 04:37

    I have tried a lot of the suggestions on SO but this is the one that actually worked for me:

    sudo sh -c 'echo /usr/local/mysql/bin > /etc/paths.d/mysql'
    

    then you type

    mysql
    

    It will prompt you to enter your password.

    0 讨论(0)
提交回复
热议问题