MySQL Server on MAMP-Windows Will Not Start

2020-05-28 01:08发布

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

标签: mysql
6条回答
时光不老,我们不散
2楼-- · 2020-05-28 01:28

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

查看更多
Emotional °昔
3楼-- · 2020-05-28 01:29

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
查看更多
Animai°情兽
4楼-- · 2020-05-28 01:46
  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.

查看更多
▲ chillily
5楼-- · 2020-05-28 01:48

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.
查看更多
我命由我不由天
6楼-- · 2020-05-28 01:49

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
查看更多
Lonely孤独者°
7楼-- · 2020-05-28 01:50

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.

查看更多
登录 后发表回答