start MySQL server from command line on Mac OS Lion

前端 未结 14 1463
名媛妹妹
名媛妹妹 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

    As this helpful article states: On OS X to start/stop MySQL from the command line:

    sudo /usr/local/mysql/support-files/mysql.server start 
    sudo /usr/local/mysql/support-files/mysql.server stop 
    

    On Linux start/stop from the command line:

    /etc/init.d/mysqld start 
    /etc/init.d/mysqld stop 
    /etc/init.d/mysqld restart 
    

    Some Linux flavours offer the service command too

    # service mysqld start 
    # service mysqld stop 
    # service mysqld restart
    

    or

     # service mysql start 
     # service mysql stop 
     # service mysql restart 
    

提交回复
热议问题