Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL shutdown unexpectedly in XAMPP while apache working

This message is in my XAMPP control panel when I click the start button.
This warning is showing that MySQL shutdown unexpectedly, but the Apache Server is running fine.

11:29:21 AM  [main]     Starting Check-Timer
11:29:21 AM  [main]     Control Panel Ready
11:29:28 AM  [main]     Executing "c:\xampp\mysql"
11:29:50 AM  [mysql]    Attempting to start MySQL app...
11:29:51 AM  [mysql]    Status change detected: running
11:30:00 AM  [mysql]    Status change detected: stopped
11:30:00 AM  [mysql]    Error: MySQL shutdown unexpectedly.
11:30:00 AM  [mysql]    This may be due to a blocked port, missing dependencies, 
11:30:00 AM  [mysql]    improper privileges, a crash, or a shutdown by another method.
11:30:00 AM  [mysql]    Press the Logs button to view error logs and check
11:30:00 AM  [mysql]    the Windows Event Viewer for more clues
11:30:00 AM  [mysql]    If you need more help, copy and post this
11:30:00 AM  [mysql]    entire log window on the forums

This is MySQL error log:

2020-05-05 11:29:51 0 [Note] InnoDB: using atomic writes.
2020-05-05 11:29:51 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-05-05 11:29:51 0 [Note] InnoDB: Uses event mutexes
2020-05-05 11:29:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-05-05 11:29:51 0 [Note] InnoDB: Number of pools: 1
2020-05-05 11:29:51 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-05-05 11:29:51 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-05-05 11:29:51 0 [Note] InnoDB: Completed initialization of buffer pool
2020-05-05 11:29:51 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-05-05 11:29:51 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-05-05 11:29:51 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-05-05 11:29:51 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2020-05-05 11:29:51 0 [Note] InnoDB: Waiting for purge to start
2020-05-05 11:29:51 0 [Note] InnoDB: 10.4.8 started; log sequence number 113908; transaction id 9
2020-05-05 11:29:51 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2020-05-05 11:29:51 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-05-05 11:29:51 0 [Note] InnoDB: Buffer pool(s) load completed at 200505 11:29:51
2020-05-05 11:29:51 0 [Note] Server socket created on IP: '::'.

I tried most of the things I found on StackOverflow, but it didn't work.
Can anyone help me to find a solution?

like image 823
avishkaME Avatar asked May 05 '20 06:05

avishkaME


Video Answer


2 Answers

I found this helpful after searching for nearly an hour online. MySQLErrorFix You can go through the solution screenshotted here or browse the XAMPP forum here

like image 112
aghwotu Avatar answered Oct 13 '22 01:10

aghwotu


This method solved solved my issues

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.

And, Its DONE . No databases lost, no ports changed, no run as administrator, no force recovery, no kill mysqld process, no restoring from previous versions, no more errors.

For more information check this blog post

like image 34
Godwin Avatar answered Oct 12 '22 23:10

Godwin