'How to solve "Error: MySQL shutdown unexpectedly" In Xamp?
When I open XAMPP and click start MySQL button and it gives me an error. I had started it just before, but now it isn't working.
It given error below in xammp
Error: MySQL shutdown unexpectedly.
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
Here is the contents of the error log:
2022-03-05 11:17:33 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-03-05 11:17:33 0 [Note] InnoDB: Uses event mutexes
2022-03-05 11:17:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-03-05 11:17:33 0 [Note] InnoDB: Number of pools: 1
2022-03-05 11:17:33 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-03-05 11:17:33 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-03-05 11:17:33 0 [Note] InnoDB: Completed initialization of buffer pool
2022-03-05 11:17:36 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-03-05 11:17:36 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-03-05 11:17:36 0 [Note] InnoDB: Setting file 'D:\xamp_7.2\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-03-05 11:17:36 0 [Note] InnoDB: File 'D:\xamp_7.2\mysql\data\ibtmp1' size is now 12 MB.
2022-03-05 11:17:36 0 [Note] InnoDB: Waiting for purge to start
2022-03-05 11:17:36 0 [Note] InnoDB: 10.4.13 started; log sequence number 5683247830; transaction id 653050
2022-03-05 11:17:36 0 [Note] InnoDB: Loading buffer pool(s) from D:\xamp_7.2\mysql\data\ib_buffer_pool
2022-03-05 11:17:36 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-03-05 11:17:36 0 [Note] InnoDB: Buffer pool(s) load completed at 220305 11:17:36
2022-03-05 11:17:36 0 [Note] Server socket created on IP: '::'.
What is the cause of these errors and how can I rectify them?
Solution 1:[1]
There are several causes to this problem, and here are some solutions:
- Change Your MySQL Port
One of the main causes of this error “MySQL shutdown unexpectedly” is another software using the port assigned to MySQL which is 3306. To verify this you can use netstat module from XAMPP’s control panel, right above the Shell tool. You can fix this problem and prevent it from repeating in the future by simply changing mysql port. To change it, do the following:
- Click Confing found at the top right corner
- Click Services and Port Settings
- Select MySQL then change 3306 to 3307 then click save
- On the main xammp screen, Click on mysql's config then select my.ini then search and replace 3306 with the new port number used, in our case 3307 then save
- Restart xampp then the problem is solved! But if your problem is not solved, proceed to solution number 2 below
- Restore Your Database Backup
Onother reason for this error is corrupted database, to fix it simply restore your database backup which is created automatically by xampp. By default, your XAMPP MySQL backup files should be under Local Disk > XAMPP > MySQL. Inside that directory, you’ll see several folders, two of which are called data and backup. he data folder includes all of the files that your database uses. The backup folder contains a single recent copy of your MySQL. To restore the MySQL backup, change the name of the data folder to anything else, such as data-old. Then rename the backup folder to data. That’s it!
Solution 2:[2]
For my, open and empty the file multi-master.info
which is at the base of folder data
is enough for me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Snaville |
Solution 2 | gwendal |