MAMP mysql server won't start. No mysql processes are running

前端 未结 26 2068
我寻月下人不归
我寻月下人不归 2020-12-02 07:02

My MAMP mysql server won\'t start. All of the suggestions I\'ve seen on the web say to check for other mysqld processes running and kill them if they exist, and that it shou

相关标签:
26条回答
  • 2020-12-02 07:47

    What worked for me was removing all files (but not directories) in the mysql dir.

    Edit #2 As per answers below, you only need to delete the log files: [ib_logfile0, ib_logfile1]

    So quit MAMP and then in the terminal:

    rm /Applications/MAMP/db/mysql/ib_logfile* #(or wherever your MAMP is installed)
    

    Edit!: A few people have mentioned that you may want to back up these files first in case anything goes wrong, so maybe just use mv instead:

    mv /Applications/MAMP/db/mysql/*  /tmp/.
    

    If this doesn't work go back and kill all processes: sudo killall -9 mysqld

    This is also duplicated here: mysql server won't start MAMP

    0 讨论(0)
  • 2020-12-02 07:47

    MAMP & MAMP PRO 4.0.6 was starting MySql server correctly but stopped doing so after my machine updated the OS to macOS Sierra (10.12.2). I tried a few options mentioned here including setting folder permissions and re-install etc. Nothing seemed fixed the issue for me so I shifted to XAMPP and it is serving OK so far.

    Update: I've got MAMP working with this simple solution here.

    0 讨论(0)
  • 2020-12-02 07:48

    Since none of the answers here solved my particular issue, I should probably add my own solution to to the list.

    I had to hard reset my computer while MAMP was still running. This sometimes leads to a problem where, after restarting the machine MAMP can start the Apache Server, but can not start the MySQL server for some reason.

    My solution for this issue was to:

    • Close MAMP
    • Go to Applications/MAMP/tmp/mysql
    • delete the file mysql.sock.lock
    • Restart MAMP
    0 讨论(0)
  • 2020-12-02 07:48

    In case of MAMP PRO you need to remove ib_logfiles here:

    rm -rf /Library/Application\ Support/appsolute/MAMP\ PRO/db/mysql56/ib_logfile*
    
    0 讨论(0)
  • 2020-12-02 07:49
    rm /Applications/MAMP/db/mysql56/*
    

    Works fine, but then it shows "No database found" in phpmyadmin although there are databases, so my drupal gave me errors because of this.

    All I need to do is simply remove two files ib_logfile0 and ib_logfile1 from /Applications/MAMP/db/mysql56/ and that did the trick for me.

    0 讨论(0)
  • 2020-12-02 07:51

    I had to do a combination of things. First I had to change the permissions on my mysql directory. applications/MAMP/db/mysql56/mysql see Stackoverflow here

    If that doesn't work add in a my.cnf file to applications/MAMP/conf folder with the following

    [mysqld]
    innodb_force_recovery = 1
    

    see Adel 'Sean' Helal . answer

    This is what ended up working for me.

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