Reputation: 13
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?
Upvotes: 0
Views: 23837
Reputation: 7
simple steps to resolve it without changing the default port 3306:
Upvotes: -1
Reputation: 129
Changing port in my.ini works fine
comment default #port=3306, add port=81
Path: C:\xampp\phpMyAdmin\config.inc.php
Add the port that you're using for MySql
$cfg['Servers'][$i]['port'] = '81';
Search for the line related to MySQL defaults in php.ini
mysqli.default_port = 3306
If you find it, change it to match your MySQL port:
eg. mysqli.default_port = 81
Save the file and restart your web server (Apache).
Upvotes: 0
Reputation: 425
1.Menu Config → Apache → Open httpd.conf. Search for Listen or 80, and update the listen port to 8081. Save and restart the server.
2.Ctrl + Alt + Del
End task mysqld
Restart MySQL
3.Xampp stop Instantly after start.
copy all files and folder from C:\xampp\mysql\backup and paste into C:\xampp\mysql\data.
Upvotes: 0
Reputation: 141
For me, open and empty the file multi-master.info
which is at the base of folder data
is enough for me.
Upvotes: 14
Reputation: 92
Open data folder and delete all ib_logfile* (ib_logfile0, ib_logfile1). Then restart xamp, so it solved for me.
Reference: https://community.apachefriends.org/f/viewtopic.php?t=82071&p=276632
Upvotes: 3
Reputation: 1
Fix this error with just 2 steps:
If you do this it is possible that some DB that you are also using in that port will be deleted, make sure you have a copy before proceeding.
Upvotes: 0
Reputation: 39
There are several causes to this problem, and here are some solutions:
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:
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!
Upvotes: 1