简体   繁体   中英

MAMP MySQL won't start (Windows 10)

I see from reading around this is a very common problem and there are 2 recommended main solutions:

  1. clear the temp files; and
  2. check if another instance of MySQL is running.

Solution 1 - Clear files I have cleared ib_logfile0, ib_logfil1 and iddata1. When I restart MAMP, it recreates these files but the server does not start.

Solution 2 - Close other instances of MySWL I am unable to find a way to check if MySQL is already running else where. Reading around (inc MAMP help site), I should use Window task manager to search for "MySQLd" and close any instances that are running, however Win10 seems to have delete the search function from the task manager. A look through the processes did not show any though:

screen shot of windows task manager

Next I have seen people adding "innodb_force_recovery = 1" to my.cnf file. I searched for my.cnf but couldn't find it. Instead I tried adding the line to C:\\MAMP\\conf\\mysql\\my.ini and I also tried adding "innodb_force_recovery = 2". Neither worked.

I tried changing the port number that MySQL uses to 3307, that didnt work either.

Finally, I uninstalled and re-installed MAMP - didn't work.

The MySQL error log reads:

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

[Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

[Note] C:\\MAMP\\bin\\mysql\\bin\\mysqld.exe (mysqld 5.7.24-log) starting as process 9044 ...

I think it would be useful if there is a way to check for instances of MySQL running via the command line, and then if they is one, how to close it from the command line.

Following steps fixed my issue

 1. Stop your MAMP Server.
 2. Find the db folder for mysql. In my case: C:\MAMP\db\mysql
 3. Rename the mysql-bin.index file to mysql-bin_old.index
 4. Start your MAMP Server

This question has been answered here: MySQL Server on MAMP-Windows Will Not Start

The fix posted by this user apparently comes from MAMP support. My problem was identical to yours and it worked for me. The issue related to binary logging, which can be disabled in a configuration file.

Good luck.

This is what worked for me :

  1. Click on Start Servers in MAMP
  2. Manually click on mysql.exe in MAMP installation folder C:\\MAMP\\bin\\mysql\\bin\\mysql.exe

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM