How to solve the problem that the MySQL service in XAMPP shuts down automatically after being started for a while?

Did your MySQL service in XAMPP shut down automatically? This article provides a solution to help you resolve this issue.

I wanted to test WordPress website building and modify WordPress theme code on my local computer . After installing XAMPP Win64 software , I did not encounter any problems. MySQL started in the control panel and everything was normal.

However, when I restarted the computer, Apache was still working, but MySQL would not start!

Then, try to reinstall XAMPP, but MySQL can't work as usual, and even once the MySQL service is started, it will automatically shut down soon.

The MySQL service in XAMPP is automatically closed after a while after it is started

How to solve the problem that the MySQL service in XAMPP shuts down automatically after being started for a while?

The following is part of the error log of XAMPP's MySQL service▼

09:48:10  [mysql]   Attempting to start MySQL app...
09:48:10  [mysql]   Status change detected: running
09:48:11  [mysql]   Status change detected: stopped
09:48:11  [mysql]   Error: MySQL shutdown unexpectedly.
09:48:11  [mysql]   This may be due to a blocked port, missing dependencies, 
09:48:11  [mysql]   improper privileges, a crash, or a shutdown by another method.
09:48:11  [mysql]   Press the Logs button to view error logs and check
09:48:11  [mysql]   the Windows Event Viewer for more clues
09:48:11  [mysql]   If you need more help, copy and post this
09:48:11  [mysql]   entire log window on the forums

How to solve the problem that the MySQL service in XAMPP shuts down automatically after being started for a while?

Open a shell from the control panel and start XAMPP with the following command ▼

mysqld --console --skip-grant-tables --skip-external-locking

Open another shell from the control panel and use the following commands to repair the database ▼

mysqlcheck -r --databases mysql --use-frm
  • Stop XAMPP, close the shell, and restart XAMPP.

Comment

Your email address will not be published. Required fields are marked with * .

Scroll to Top