• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP Bitz

A curated collection of code snippets for WordPress

  • Home
  • About
  • Blog
  • Code Snippets
You are here: Home / WordPress Development Tips / How to fix “Error: MySQL Shutdown Unexpectedly” in XAMPP control panel

How to fix “Error: MySQL Shutdown Unexpectedly” in XAMPP control panel

WordPress Development Tips · November 7, 2022

This post brought to you by RocketGeek, ButlerBlog, and the following:

 

Are you having trouble with the XAMPP error: MySQL shutdown unexpectedly?

This is usually the result of corrupted files or an improper shutdown. Here is a simple step-by-step to fix the issue.

What can cause the error?

  • Corrupted files
  • Improper database shut down
  • Missing files
  • Port changes

Here’s what it looks like:

Steps to fix the problem

  1. Stop everything in XAMPP, specifically MySQL and Apache
  2. Go to your XAMPP folder and rename the /xampp/mysql/data folder to /xampp/mysql/data-old
  3. Create a new (empty) folder and name it “/xampp/mysql/data“
  4. Copy the folders from “/xampp/mysql/backup” and paste them into the new, empty “/xampp/mysql/data” folder
  5. Copy all the database folders from the “/xampp/mysql/data-old” folder and paste them into the “/xampp/mysql/data” folder
  6. Copy “ibdata1” and all of the log files with “ib_” prefixes (like ib_logfile0, ib_logfile1, etc) from “/xampp/mysql/data-old” and paste into the “/xampp/mysql/data” folder
  7. Start MySQL from the XAMPP control panel

That’s it! Now go to phpMyAdmin to check if all the databases are available and running properly.

Filed Under: WordPress Development Tips

Chad Butler

This post brought to you by RocketGeek, ButlerBlog, and the following:

 

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Join for free!

Get free code snippets, WordPress best practices, and practical Content Marketing advice from seasoned WordPress expert Chad Butler (butlerblog):

Recent Posts

  • Bitnami WordPress Autoptimize cannot write to the cache directory
  • Create and delete WordPress sites in XAMPP with a batch file
  • How to fix “Error: MySQL Shutdown Unexpectedly” in XAMPP control panel
  • Fix missing Customizer in WordPress 6
  • Use Proofy.io API to validate WordPress registrations

Copyright © 2023 · Maker Pro on Genesis Framework · WordPress · Log in