start MySQL server from command line on Mac OS Lion

前端 未结 14 1492
名媛妹妹
名媛妹妹 2020-11-30 16:22

I installed mySQL for my Mac. Beside starting the SQL server with mySQL.prefPane tool installed in System Preference, I want to know the instruction to start from command-li

14条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 16:37

    If you installed it with homebrew, the binary will be somewhere like

    /usr/local/Cellar/mysql/5.6.10/bin/mysqld
    

    which means you can start it with

    /usr/local/Cellar/mysql/5.6.10/support-files/mysql.server start
    

    and stop it with

    /usr/local/Cellar/mysql/5.6.10/support-files/mysql.server stop
    

    Edit: As Jacob Raccuia mentioned, make sure you put the appropriate version of MySQL in the path.

提交回复
热议问题