MySQL Server on MAMP-Windows Will Not Start
Asked Answered
K

8

10

I am using MAMP 4.1 on Windows 10 and cannot get MySQL server to start. When I uninstalled MAMP and re-installed it MySQL server starts up, but when I stop it, it will not start back up. I also went into the \mamp\db\mysql\ and deleted the four log files hilited below. Then I turned the server off, then back on, but only Apache starts up, not MySQL.

There is also a process running in services called MySQL80. When I try to start it I get the error message shown. I have tried many ways to delete it, including going to the command prompt and using "sc mysql80" and going to 'regedit'. MySQL80 does not show up anywhere so that I can delete it.

Also, the Resource Monitor below shows that Apache is running on port 80, but nothing on port 3306. And yes, my MAMP Preferences are set to port 3306 for MySQL.

When MySQL was running, I had 2 processes of 'mysqld' listening: one session on IPv6 Port 3306, and the other session on IPv4 Port 3306?

What's wrong and how do I fix it?

And, is there suppose to be (2) sessions of 'mysqld' both listening on port 3306 where one is on IPv6 and the other is on IPv4?

Thanks Community.

MAMP Control Panel

mysql80 Service

Resource Window with Ports Listed

MAMP Log Files

Kief answered 21/1, 2019 at 18:39 Comment(0)
S
34

I had the same problem. I contacted mamp support, and their answer was the following; it worked for me. Hope this helps you too. Stop all servers in MAMP.

The below assumes your MAMP installation directory is C:\MAMP\.

For MAMP:

  • With Windows Explorer go to folder C:\MAMP\db\mysql\
  • First backup all files that begin with mysql-bin.*, then delete them (including mysql-bin.index file.)
  • Then try starting all MAMP servers again (wait for MySQL to turn light on).
  • After that stop all MAMP servers again.
  • You'll now try to disable binary log-bin in MAMP (or MAMP PRO)
  • Open up MySQL configuration file in text editor of your choice: C:\MAMP\conf\mysql\my.ini
  • Find following text: log-bin
  • Comment this line by adding # character at start of line.
    #log-bin=mysql-bin
    
  • Save and restart servers
  • After that put the mysql-bin.* files back in their place.
Seppuku answered 22/1, 2019 at 15:49 Comment(5)
Thanks for the help. I uninstalled MAMP and have installed WAMP. So far so good. But if I do go back to MAMP then I will definitely try your suggestion.Kief
This is the only thing that worked for me after trying everything else. Thank you!Coleville
In addition to this issue, I found out that MAMP no longer supports MySQL, but only MariaDB. So, I switched to WAMP and have had ONLY SUCCESS! Maybe this will help others.Kief
This worked for me until I put the mysql-bin files back, so I deleted those (I still have the backup if needed) and everything seems to work fine now.Fe
Having used MAMP on mac, I thought it would work well on Windows. Nope. So switched to WAMP as @Kief said. Problem solved.Forta
B
11
  1. Turn off your MAMP Server.
  2. Locate your db folder for mysql. Example: C:\MAMP\db\mysql
  3. Rename the mysql-bin.index file to mysql-bin_old.index (or anything really)
  4. Turn on your MAMP Server

This is a very common issue with MAMP. If this happened to you out of the blue, this is probably the fix.

Blimey answered 28/7, 2019 at 3:15 Comment(1)
Solved my issue. Thanks.Hist
P
4

This is what I did to solve this issue:

  1. Quit MAMP if open
  2. Navigate to /MAMP/tmp/mysql
  3. Rename mysql.sock.lock
  4. Restart MAMP
Piker answered 6/4, 2020 at 15:31 Comment(2)
Hi, what did you rename it to?Shift
Hi, lasbreyn. If I recall correctly, the name doesn't matter. I believe I had renamed it to _mysql.sock.lock. The objective is to have MAMP recreate the file.Piker
B
2

my issue was Avast Antivirus blocking MAMP, disabled for 10 minutes and Apache started

But answered 15/8, 2019 at 15:11 Comment(0)
P
0

Uninstall entire MAMP and also any other xamap and wamp if you install previously. Check the drive C. No any other folder or file related to this present there. then reinstall MAMP again. All the problems are solve your apache and mysql both start. please vote me.

Potassium answered 28/10, 2019 at 16:42 Comment(1)
Welcome to StackOverflow! This answer doesn't really add any new information, and is much less detailed than the most upvoted answer. Answers that don't provide anything new tend to get downvoted and/or deleted, especially if they're asking for upvotes like yours is. Please edit your post to include more detail and explanation, or delete it so you don't get any downvotes.Fuliginous
J
0

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)

Tip : You can pin mysql.exe to Start Menu so you don't always have to search for this folder

Juggins answered 27/1, 2021 at 19:36 Comment(0)
H
-1

I had the same problem today. I did try removing everything from C:\MAMP\db\mysql\ and tried to restart MAMP & servers. But it failed.

Then I noticed the following error in the mysql log file /MAMP/logs/mysql_error_log.err

[error] Cannot open windows event_log ; check privileges

This basically means that you don't have sufficient access.

So

  • I replaced all the files that I originally deleted
  • shutdown the server & MAMP.
  • Now right click on the MAMP icon & choose run as administrator
  • Now it starts up normally
Halie answered 10/4, 2019 at 19:32 Comment(1)
In the C:\MAMP\db\mysql\ you have all your DB, so you removed all your dataResidentiary
T
-1

This probably won't be the solution for most people, but if you recently made any edits to:

C:/Users/Public/Documents/Appsolute/MAMPPRO/conf/my.ini

You might want to try to go in and revert those (in case they are not valid). I put some invalid things there, and then SQL wouldn't start, and Mamp told me to check the server logs, but I couldn't find any relevant error messages there other than something like "SQL could not start".

Note: It's an SQL configuration file.

Tupper answered 6/6, 2023 at 23:33 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.