Mysql server on MAMP won't start

后端 未结 6 1142
小蘑菇
小蘑菇 2020-12-07 19:05

My Mysql server on MAMP won\'t start. This is the error:

161224 00:15:00 mysqld_safe Logging to \'/Applications/MAMP/logs/mysql_error_log.err\'. 16

相关标签:
6条回答
  • 2020-12-07 19:55

    Remove the files ib_logfileN (N being the number) from the MAMP/db/mysql56 folder.

    Then restart MAMP.

    Should Work!!

    Edit: If the above step doesn't work completely, please remove the ibdata<n> file as well, based on the comments.

    0 讨论(0)
  • 2020-12-07 19:56

    In some cases it may possible that the MySQL is already running on 3306 port. So, you can change the port number with 3307.

    P.S: If you are bound to use 3306 in that case I think you can stop existing MySql server and let MAMP to do it for you.

    0 讨论(0)
  • 2020-12-07 19:58

    My MAMPs MySQL stopped working after a power failure, this worked for me:

    1. Stop servers from terminal

      • cd /Applications/MAMP/bin
      • ./stop.sh
    2. Create my.cnf file in /Applications/MAMP/conf with the following: [mysqld] innodb_force_recovery = 1

    3. Start MySQL from same terminal window.

      • ./startMysql.sh
    4. Stop MySQL once it has recovered (Check the log in /Applications/MAMP/logs/mysql_error_log.err).

      • ./stopMysql.sh
    5. Remove the lines from my.cnf, save and start the servers as usual from the MAMP app.

    0 讨论(0)
  • 2020-12-07 19:59

    I am working on oS-X (Mac), I was wondering around and came to see this post which help me a lot.
    Many readers are being able to solve this problem thanks to the amazing here are the step to fix it out--

    This issue generally occur due to explicitly closing of MAMP serves.

    1. Quit MAMP.
    2. In the finder go to Applications/MAMP/db/mysql/
    3. Delete the last log file (look for a file named ib_logfileN – being N the log number Eg-ib_logfile0 and ib_logfile1) we can see in below image.

    1. Please back up these before you delete them.
    2. Restart MAMP.

    It Worked for me, hope will work for you too..

    0 讨论(0)
  • 2020-12-07 19:59

    MAMP is so touchy. Here's what worked for me:

    cd /Applications/MAMP

    Move or rename: mv tmp tmp_OLD.

    Recreate the folder and a subfolder: mkdir tmp; mkdir tmp/mysql

    Now start mysql from MAMP. I think it's possible the socket lock file (tmp/mysql/mysql.sock.lock) gets corrupted and needs to be regenerated.

    0 讨论(0)
  • 2020-12-07 20:10

    I killed the process mysqlid via Activity Monitor on MacOS and restarted MAMP and MySql run successfully.

    Update: Even this solution works without restarting MAMP.

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