MySQL no longer starting “An attempt was made to access a socket in a way forbidden by its access permissions.” (Windows 10)

MySQLstartupwindows

I don't think this is another "some other process is using port 3306 rtfm" kinda question.

I have been running MySQL 8.0.x fine for a couple of months on Windows 10 for some local python development. As of this week it refuses to start (don't know the exact date of when it started, but logs say it was still running 30/10/2020).

2020-11-07T10:57:43.452460Z 0 [System] [MY-010910] [Server] C:\tools\mysql\current\bin\mysqld: Shutdown complete (mysqld 8.0.22)  MySQL Community Server - GPL.
2020-11-07T11:01:21.048896Z 0 [System] [MY-010116] [Server] C:\tools\mysql\current\bin\mysqld (mysqld 8.0.22) starting as process 3480
2020-11-07T11:01:21.071269Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-11-07T11:01:21.618118Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-11-07T11:01:22.095397Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
2020-11-07T11:01:22.174810Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-11-07T11:01:22.175307Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2020-11-07T11:01:22.177656Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: An attempt was made to access a socket in a way forbidden by its access permissions.

At first I thought maybe the 3306 port was in used, but that was not the case. Did a reboot to be sure. Stopped Docker. Checked if the exception was still present in the windows firewall. All good.
Tried port 3307 just to see what happened. Disabled Windows Defender. Same result. So my feeling is this might be caused by some Windows Update or changed security setting.

netstat shows no process listening to port 3306:

netstat -ano | find /i "3306"
<no output>

I did google a lot, but couldn't really find anything beyond SELinux or Antivirus preventing stuff.

Any pointers. Probably Windows Defender / Firewall, but don't know what setting to adjust. Mysql exception rule is in place:

mysql exception

Valentijn

Best Answer

Found the issue. Even though I rebooted (turned off, turned on), my ethernet connection (via dell dock) was not active. So only wifi was active and apparently windows prevents services from listening to ports on that. Even though there's an exception present for public networks in the firewall. Anyway, after disconnecting and reconnecting the ethernet cable it started working again.