How to solve “Error: MySQL shutdown unexpectedly” XAMPP

Click start mysql button and it gives me an error: “XAMPP – Error: MySQL shutdown unexpectedly”. I tried restarting the XAMPP server, but it still doesn’t work.

 

Solution:

1. Click “Explorer” on XAMPP Control Panel

then open the “mysql” folder 

2. Rename the “data” folder as “data_bk” (or anything you like )

3. Create a new data folder

 

4. Copy  all the files from backup folder to data folder, which is created before

5. copy data folder(for me is cu****) and “ibdata1″from mysql/data_bk

 

6. Paste the files we copy before to mysql/data

7. restart the XAMPP server

 


One thing to note is that: if we got “Error establishing a database connection” when entrance localhost/your site name 

Create a new DB user with the same user info as in the wp-config.php file

the wp-cofig.php located in xampp/htdocs/your site name

Views: 183

Leave a Reply

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