XAMPP – Error: MySQL shutdown unexpectedly

reason for XAMPP - Error: MySQL shutdown unexpectedly.

Generally there are four possible reason for XAMPP – Error: MySQL shutdown unexpectedly.

1. Skype is open and blocked mysql port
Solution: If your skype is open please quit and restart xampp

2. Apache uses port 80 and it is blocked. For this error message will be little different like Error: Apache shutdown unexpectedly. Due to block port…

Solution:

  • Go to your xampp installed directory /apache/conf (C:\xampp\apache\conf) ,
  • search for httpd.conf
  • Open that file using textpad/notepad, search for Listen or 8000 and update listen port to 8000 and save the file.
  • Restart xampp, start the servers.

3. MySQL uses port 3306 and it is blocked. You can change MySQL Port also.

How to change MySQL port?

  • Go to your xampp installed directory xampp\mysql\bin (C:\xampp\mysql\bin) ,
  • search for my.ini
  • Open that file using textpad/notepad, search for 3306 and update 3306 couple of times and save the file.
  • Restart xampp, start the servers.

4. How to solve XAMPP – Error: MySQL shutdown unexpectedly?

  • Step 1. Rename the folder c:\xampp\mysql\data to c:\xampp\mysql\data_old (you can use any name).
  • Step 2. Create a new folder c:\xampp\mysql/data.
  • Step 3. Copy the content that resides in mysql\backup to the new mysql\data folder.
  • Step 4. Copy all your database folders that are in mysql\data_old to mysql\data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old).
  • Step 5. Finally copy the ibdata1 file from mysql\data_old and replace it inside mysql\data folder.
  • Step 6. Start MySQL from XAMPP control panel.

Solution 4 source

Related Posts


Creating a Responsive YouTube Video iframe for Seamless Integration

Introduction: In the dynamic world of web development, creating a responsive design is crucial for p...

What is MySQL? A Comprehensive Guide

Have you ever wondered what MySQL, a source relational database management system, is and how it wor...

Creating a React Project: Step-by-Step Guide

Ready to dive into the world of React? Want to create your own React project from scratch? In this t...