zsh: command not found: mysql

后端 未结 5 1555
说谎
说谎 2021-02-05 07:42

Trying to use MySQL for rails app and downloaded it from dev.mysql.com.

After successfully installing the package and seeing the option to start and stop the server from

相关标签:
5条回答
  • 2021-02-05 08:09

    You should try paste this line to your environment variables

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

    Then try restart your environment variables with the following command

    source ~/.zshrc              #If you use Oh-My-Zsh
    
    source ~/.bashrc             #If you use Default Bash
    
    0 讨论(0)
  • 2021-02-05 08:12

    On the latest MacOs Catalina.I hava tried to do above to sole this problem;

    vi ~/.zshrc                                 // open the zsh config and edite
    
    export PATH=${PATH}:/usr/local/mysql/bin/   // to add these words
    
    source ~/.zshrc                            // make it work
    

    Reopen a teminal and run mysql -u root -p,input the password then you can login your mysql;

    0 讨论(0)
  • 2021-02-05 08:13

    For my MacOS Catalina. I tried everything above, it didn't work. The code below worked for me. Thanks to this link https://www.youtube.com/watch?v=kijzRVw8eUQ. Input the code in your terminal.

    /usr/local/mysql/bin/mysql -uroot -p
    
    0 讨论(0)
  • 2021-02-05 08:19

    This was supposed to be a problem within my configuration and $PATH variable. I followed mysql on mactutorial to resolve this.

    In my terminal opened up configuration by going to vi ~/.zshrc. Located line for export PATH="..." and appended :/usr/local/mysql/bin to it.

    Above procedure resolved my issue.

    0 讨论(0)
  • 2021-02-05 08:26

    On MacOs Catalina Open a terminal and run.

     sudo nano /etc/paths
    

    Added to end of file

    /usr/local/mysql/bin
    

    Save the changes and quit. Reloaded terminal. Open a new terminal and run.

     mysql -u root -p
    

    Its works for me.!!

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