Page 1 of 1

Error: MySQL shutdown unexpectedly

PostPosted: 17. November 2022 19:36
by kecheh
Hi everyone,
I'm using Xampp at work and at home to continue work's project.
At work I've Windows 11 laptop with standard user session but I've install Xampp in admin session and run it as admin but often I meet this error message :
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums


I've found 2 solutions :
    1. Uninstall/reinstall Xampp (not possible because this take long time, I've to backup my projects and I havn't the access to admin session)
or
    2. Copy all the files of backup to data (C:xampp\mysql) but it's a problem too.

But the most weird is that at home I've a different computer, network and I'm admin and I've theses errors too.
I don't known why this errors are here if someone have ideas.

Thanks a lot

Re: Error: MySQL shutdown unexpectedly

PostPosted: 17. November 2022 22:19
by Froosh
You do not mention if your home laptop's XAMPP version and work laptop's XAMPP version are the same. But that may or may not matter here.

Is the backup you mention one that you have done, or the contents of the xampp/mysql/backup folder? The mysql/backup folder only contains core MySql database files, and do not include any databases/data you may have created. If you use the ones from the xampp/mysql/backup folder, and just overwrite the ones in the xampp/mysql/data folder, leaving everything else in place, you are likely not eliminating the cause of MySql not starting. To use the backup files from the mysql/backup folder, you would backup any existing content in the mysql/data folder, and once you've done that, delete the existing folder contents, and copy over the content from mysql/backup. Doing this should be your last resort.

In some cases, I've seen mention cleaning up some files, but I personally don't think this is a great solution. Instead, search the forum for something matching your specific error, check your mysql_error.log. You can often correct a database issue using the XAMPP Shell and executing MySql commands from there.

Whatever you do, once you resolve the issue, do yourself a big favor, and 1. make regular backups of your data, and 2. make sure that you configure XAMPP to run MySql as a Windows Service. Running MySql as a regular Windows process seems problematic from my experience. I have MySql configured to run as a Windows Service and have not had any database issues since making that change.

Re: Error: MySQL shutdown unexpectedly

PostPosted: 11. March 2023 03:43
by richardferrym
kecheh wrote:Hi everyone,
I'm using Xampp at work and at home to continue work's project.
At work I've Windows 11 laptop with standard user session but I've install Xampp in admin session and run it as admin but often I meet this error message :
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums


I've found 2 solutions :
    1. Uninstall/reinstall Xampp (not possible because this take long time, I've to backup my projects and I havn't the access to admin session)
or
    2. Copy all the files of backup to data (C:xampp\mysql) but it's a problem too.

But the most weird is that at home I've a different computer, network and I'm admin and I've theses errors too.
I don't known why this errors are here if someone have ideas.

Thanks a lot

i have also the same issue but fixed by removing all files (files only, folder not included) on folder C:\xampp\mysql\data except file: ibdata1, ibtmp1, ib_logfile0, and ib_logfile1.