Mysql command not found in OS X 10.7

前端 未结 15 2204
臣服心动
臣服心动 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:26

    This is the problem with your $PATH:

    /usr/local//usr/local/mysql/bin/private/var/mysql/private/var/mysql/bin.

    $PATH is where the shell searches for command files. Folders to search in need to be separated with a colon. And so you want /usr/local/mysql/bin/ in your path but instead it searches in /usr/local//usr/local/mysql/bin/private/var/mysql/private/var/mysql/bin, which probably doesn't exist.

    Instead you want ${PATH}:/usr/local/mysql/bin.

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

    If you want this to be run every time you open terminal put it in the file .bash_profile, which is run when Terminal opens.

提交回复
热议问题