How To Solve Error Starting MySQL On XAMPP After Windows Update: Mutexes and rw_locks use Windows interlocked functions

How To Solve Error Starting MySQL On XAMPP After Windows Update: Mutexes and rw_locks use Windows interlocked functions


If right after an automatic Windows 10 update, your XAMPP suddenly doesn't want to start the MySQL service, while it was working fine before and you haven't done any change, this article might be for you!

Do not panic, the solution might be to simply change your MySQL port, or to use the existing backup.

The problem: error Mutexes and rw_locks use Windows interlocked functions

If you are getting this error when starting PhpMyAdmin, it means that your MySQL service is not started on XAMPP application:

MySQL said: Documentation Cannot connect: invalid settings.
mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it
Connection for controluser as defined in your configuration failed.
mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

If you are getting this error when starting MySQL on XAMPP, it means that your MySQL installation has an issue - see below how to solve it:

18:58:08 [mysql] Error: MySQL shutdown unexpectedly.
18:58:08 [mysql] This may be due to a blocked port, missing dependencies,
18:58:08 [mysql] improper privileges, a crash, or a shutdown by another method.
18:58:08 [mysql] Press the Logs button to view error logs and check
18:58:08 [mysql] the Windows Event Viewer for more clues
18:58:08 [mysql] If you need more help, copy and post this
18:58:08 [mysql] entire log window on the forums
Error Starting MySQL / PHPMyAdmin I...
Error Starting MySQL / PHPMyAdmin In XAMPP: How To Solve?

Diagnose and solve the MySQL starting error in XAMPP

First of all, to diagnose the exact error, open your XAMPP control panel, and check the error in the dialog box.

Then, open the MySQL log file on the MySQL program line, under Logs button, find the mysql_error.log file, and check in Notepad application what is the exact error.

You'll have to scroll to the bottom of the file to find the latest entries, double check that the time correspond to the latest try to start MySQL in XAMPP, and have a look at the error. In our case, this is the error we got:

2023-01-12 18:58:06 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-01-12 18:58:06 0 [Note] InnoDB: Uses event mutexes
2023-01-12 18:58:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-01-12 18:58:06 0 [Note] InnoDB: Number of pools: 1
2023-01-12 18:58:06 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-01-12 18:58:06 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2023-01-12 18:58:06 0 [Note] InnoDB: Completed initialization of buffer pool
2023-01-12 18:58:06 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2023-01-12 18:58:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-01-12 18:58:06 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-01-12 18:58:06 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2023-01-12 18:58:06 0 [Note] InnoDB: Waiting for purge to start
2023-01-12 18:58:06 0 [Note] InnoDB: 10.4.21 started; log sequence number 3993504751; transaction id 13792362
2023-01-12 18:58:06 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2023-01-12 18:58:06 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-01-12 18:58:06 0 [Note] Server socket created on IP: '::'.

No real error message is being displayed, and there might be two different ways to solve this issue, depending on your exact problem.

Method 1: Try changing the MySQL port

The first solution might be to change the MySQL port, in case a new application has been installed or started, and uses the exact same port as the one set for MySQL.

To do so, simply open the my.ini file that is located under the config button on your XAMPP control panel.

Learn SEO Basics: Enroll Today!

Boost your website's visibility and traffic by mastering the fundamentals of SEO with our easy-to-follow Basics course.

Start Learning SEO

Boost your website's visibility and traffic by mastering the fundamentals of SEO with our easy-to-follow Basics course.

There, find the current port, usually 3306 by default, and change it to another value - for example 3308.

Make sure to change each single occurence of the port in the file, which is minimum present two times, and can be written up to five times.

Once done, save the file, and try restarting your MySQL application. If that still doesn't work, the issue might be different.

Method 2: Try getting the latest backup

Go in MySQL folder, under folder XAMPP > MYSQL, and first of all, make a backup of your data folder, in case that isn't the real issue.

Then, open the backup folder, select all files except the ibdata1 file, and copy them.

Copy them under the data folder on the MYSQL root folder, and try restarting your MYSQL. It should now be working - double check that no data has been lost, for exmaple that the latest entry you've inserted in your database is present.

In conclusion: How to solve the MySQL error

To conclude, solving a MySQL error can be as simple as changing the port, or using the existing backup present in the backup folder.

If these solutions are still not working for you, best is to check the online resources to find solutions dedicated to your specific MySQL problems.

Error in starting MYSQL in XAMPP

Yoann Bierling
About the author - Yoann Bierling
Yoann Bierling is a Web Publishing & Digital Consulting professional, making a global impact through expertise and innovation in technologies. Passionate about empowering individuals and organizations to thrive in the digital age, he is driven to deliver exceptional results and drive growth through educational content creation.

Learn SEO Basics: Enroll Today!

Boost your website's visibility and traffic by mastering the fundamentals of SEO with our easy-to-follow Basics course.

Start Learning SEO

Boost your website's visibility and traffic by mastering the fundamentals of SEO with our easy-to-follow Basics course.



Comments (0)

Leave a comment