Mysql command not found in OS X 10.7

前端 未结 15 2255
臣服心动
臣服心动 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条回答
  •  猫巷女王i
    2020-12-02 04:31

    Add the following lines in bash_profile:

    alias startmysql='sudo /usr/local/mysql/support-files/mysql.server start'
    alias stopmysql='sudo /usr/local/mysql/support-files/mysql.server stop'
    

    and save the bash_profile.

    Now, in the terminal start and stop the mysql server using the following commands:

    startmysql //to start mysql server
    

    and

    stopmysql //to stop mysql server
    

提交回复
热议问题