I’ve got a XAMPP installation (Apache, MySQL, php, phpmyadmin) on a Windows 10 machine, in D:xampp
, which I’ve been using for at least 3 months without any issues.
Since today, without having changed any config or installed anything, when trying to start MySQL I get this error in XAMPP console window:
20:17:05 [mysql] Status change detected: running
20:17:08 [mysql] Status change detected: stopped
20:17:08 [mysql] Error: MySQL shutdown unexpectedly.
20:17:08 [mysql] This may be due to a blocked port, missing dependencies,
20:17:08 [mysql] improper privileges, a crash, or a shutdown by another method.
20:17:08 [mysql] Press the Logs button to view error logs and check
20:17:08 [mysql] the Windows Event Viewer for more clues
20:17:08 [mysql] If you need more help, copy and post this
20:17:08 [mysql] entire log window on the forums
And this in mysql_error.log:
InnoDB: using atomic writes.
2019-11-19 20:17:05 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-11-19 20:17:05 0 [Note] InnoDB: Uses event mutexes
2019-11-19 20:17:05 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-11-19 20:17:05 0 [Note] InnoDB: Number of pools: 1
2019-11-19 20:17:05 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-11-19 20:17:05 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-11-19 20:17:05 0 [Note] InnoDB: Completed initialization of buffer pool
2019-11-19 20:17:06 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-11-19 20:17:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-11-19 20:17:06 0 [Note] InnoDB: Setting file 'D:xamppmysqldataibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-11-19 20:17:06 0 [Note] InnoDB: File 'D:xamppmysqldataibtmp1' size is now 12 MB.
2019-11-19 20:17:06 0 [Note] InnoDB: Waiting for purge to start
2019-11-19 20:17:06 0 [Note] InnoDB: 10.4.8 started; log sequence number 300333; transaction id 171
2019-11-19 20:17:06 0 [Note] InnoDB: Loading buffer pool(s) from D:xamppmysqldataib_buffer_pool
2019-11-19 20:17:06 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-11-19 20:17:06 0 [Note] Server socket created on IP: '::'.
2019-11-19 20:17:06 0 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 10013: An attempt was made to access a socket in a way forbidden by its access permissions.
2019-11-19 20:17:06 0 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2019-11-19 20:17:06 0 [ERROR] Aborting
However it looks like nothing is running in port 3306:
- No other MySQL process or service running
- Port 3306 doesn’t show up when running netstat
- Not blocked in Windows firewall
If I change the port to something random (eg 10200) MySQL starts and works normally. Port 3307 and 3308 don’t work even though it looks like they aren’t in use either, exactly like 3306.
Things I’ve tried and didn’t solve the issue:
- (obviously) Restart XAMPP & PC
- Clear
D:xamppmysqldata
directory - Clean installation of XAMPP
- Run as admin
- Start MySQL from the Window’s console
- Reset firewall rules
- Turn off firewall/antivirus
As I mentioned before, running MySQL on some different port, like 10200, worked. So besides being able to run MySQL on 3306 again, I am also interested in finding out what exactly is going on and how it happened. Any ideas appreciated!
Edit: There was a Windows update (KB4522741), but I do not think it’s somehow related.
2
Answers
You need to update window. That worked for me
You might be facing this issue because there are other services being handled on port 3306. This could also be due to MySQL (other than the one which comes with xampp setup) installed in your system.
My solution:
Just head to the folder of bin in MySQL server on your machine and run this command from that directory in your command prompt.(for example: C:Program FilesMySQLMySQL Server 8.0bin)
mysqladmin -u root -p shutdown
This command will safely shut down your existing MySQL running on port 3306 so that you can access the same port using the MySQL on xampp. This is used to work on both without conflicts or without having to uninstall the other application or without changing the port to 3307 in the my.ini file. Now restart the xampp control panel and start the server on port 3306. This worked for me.
Hope this helps!