XAMPP MySQL service crash after reboot - mysql

I just install a XAMPP 7.3.6-2-VC15 for Win64, and when i install it, it's fine, MySQL start from control panel without error, et all is ok.
After rebooting my PC, Apache is still working, but MySQL refuse to start ! I try to reinstall XAMPP, but it's exactly the same. MySQL Work fine, and stop working after reboot.
Here is THe few log i have...
In the control panel :
09:48:10 [mysql] Attempting to start MySQL app...
09:48:10 [mysql] Status change detected: running
09:48:11 [mysql] Status change detected: stopped
09:48:11 [mysql] Error: MySQL shutdown unexpectedly.
09:48:11 [mysql] This may be due to a blocked port, missing dependencies,
09:48:11 [mysql] improper privileges, a crash, or a shutdown by another method.
09:48:11 [mysql] Press the Logs button to view error logs and check
09:48:11 [mysql] the Windows Event Viewer for more clues
09:48:11 [mysql] If you need more help, copy and post this
09:48:11 [mysql] entire log window on the forums
And in the log file :
2019-07-02 9:48:10 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-07-02 9:48:10 0 [Note] InnoDB: Uses event mutexes
2019-07-02 9:48:10 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-02 9:48:10 0 [Note] InnoDB: Number of pools: 1
2019-07-02 9:48:10 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-07-02 9:48:10 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-07-02 9:48:10 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-02 9:48:10 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1834407
2019-07-02 9:48:10 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-07-02 9:48:10 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-07-02 9:48:10 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-07-02 9:48:10 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-07-02 9:48:10 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2019-07-02 9:48:10 0 [Note] InnoDB: Waiting for purge to start
2019-07-02 9:48:10 0 [Note] InnoDB: 10.3.16 started; log sequence number 1834416; transaction id 265
2019-07-02 9:48:10 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2019-07-02 9:48:10 0 [Note] InnoDB: Buffer pool(s) load completed at 190702 9:48:10
2019-07-02 9:48:10 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-07-02 9:48:10 0 [Note] Server socket created on IP: '::'.
I try the following :
Change port for other than 3306 => no success
Run xamp control panel as admin => no success
remove temporary table ibdata1 and ibtmp1 => no success
If someone have an idea...
EDIT : I try to install as a windows service via admin panel as administrator. And so, i have some new lines in log. Seems user table is corrupted... how can i repair ?
2019-07-02 10:04:41 0 [ERROR] mysqld.exe: Table '.\mysql\user' is marked as crashed and should be repaired
2019-07-02 10:04:41 0 [ERROR] mysqld.exe: Index for table '.\mysql\user' is corrupt; try to repair it
2019-07-02 10:04:41 0 [ERROR] Couldn't repair table: mysql.user
2019-07-02 10:04:41 0 [ERROR] Fatal error: Can't open and lock privilege tables: Index for table 'user' is corrupt; try to repair it

This one helped for me:
Open shell from from control panel and start mysql with this command:
mysqld –-console –-skip-grant-tables –-skip-external-locking
Open another shell from control panel and repair database with this command:
mysqlcheck -r --databases mysql --use-frm
Stop mysql, close shells and restart mysql normally.
based on: Re: Corrupt mysql.users How to fix

I got this problem like you . I have solved this problem like below.
Copy from xampp/mysql/backup folder and paste in xampp/mysql/data folder except ibdata1 file.
If you replace ibdata1 file from xampp/mysql/data then some database you will get error table does not exist.

This one helped for me:
Open shell from from control panel and start mysql with this command:
mysqld –-console –-skip-grant-tables –-skip-external-locking
Open another shell from control panel and repair database with this command:
mysqlcheck -r --databases mysql --use-frm

Related

MySQL session won't start on XAMPP - Buffer pool(s) not load

My MySQL won't start and it shows like this:
10:55:53 ق.ظ [mysql] Status change detected: stopped
10:55:53 ق.ظ [mysql] Error: MySQL shutdown unexpectedly.
10:55:53 ق.ظ [mysql] This may be due to a blocked port, missing dependencies,
10:55:53 ق.ظ [mysql] improper privileges, a crash, or a shutdown by another method.
10:55:53 ق.ظ [mysql] Press the Logs button to view error logs and check
10:55:53 ق.ظ [mysql] the Windows Event Viewer for more clues
10:55:53 ق.ظ [mysql] If you need more help, copy and post this
10:55:53 ق.ظ [mysql] entire log window on the forums
and then this is the error logs:
2022-09-29 10:55:51 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-09-29 10:55:51 0 [Note] InnoDB: Uses event mutexes
2022-09-29 10:55:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-09-29 10:55:51 0 [Note] InnoDB: Number of pools: 1
2022-09-29 10:55:51 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-09-29 10:55:51 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-09-29 10:55:51 0 [Note] InnoDB: Completed initialization of buffer pool
2022-09-29 10:55:51 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-09-29 10:55:51 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-09-29 10:55:51 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-09-29 10:55:51 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2022-09-29 10:55:51 0 [Note] InnoDB: Waiting for purge to start
2022-09-29 10:55:51 0 [Note] InnoDB: 10.4.22 started; log sequence number 1463371418; transaction id 661011
2022-09-29 10:55:51 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2022-09-29 10:55:51 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-09-29 10:55:51 0 [Note] Server socket created on IP: '::'.
and error in Windows Event Viewer:
Log Name: Application
Source: MariaDB
Date: 07/07/1401 11:32:33 ق.ظ
Event ID: 100
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: DESKTOP-33KUAJ5
Description:
The description for Event ID 100 from source MariaDB cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Aborting
The message resource is present but the message was not found in the message table
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="MariaDB" />
<EventID Qualifiers="49152">100</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2022-09-29T08:02:33.6734979Z" />
<EventRecordID>20403</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>Application</Channel>
<Computer>DESKTOP-33KUAJ5</Computer>
<Security />
</System>
<EventData>
<Data>Aborting
</Data>
</EventData>
</Event>
What is the cause of these errors and how can I fix it?
This is how it was fixed for me :
Open shell and start MySQL with this command:
mysqld –-console –-skip-grant-tables –-skip-external-locking
Repair database with this command:
mysqlcheck -r --databases mysql --use-frm
Stop MySQL, restart MySQL from XAMP.
Source : MySQL Forum

Error: MySQL shutdown unexpectedly. Xampp

XAMPP 3.3.0
MySql port: 3306
I checked any conflict with this port and found nothing
MySql doesn't respond to any request, infinite loading and after that it shuts down leaving no error logs
XAMPP logs:
21:05:56 [mysql] Error: MySQL shutdown unexpectedly.
21:05:56 [mysql] This may be due to a blocked port, missing dependencies,
21:05:56 [mysql] improper privileges, a crash, or a shutdown by another method.
21:05:56 [mysql] Press the Logs button to view error logs and check
21:05:56 [mysql] the Windows Event Viewer for more clues
21:05:56 [mysql] If you need more help, copy and post this
21:05:56 [mysql] entire log window on the forums
MySql server logs:
2022-06-18 21:07:34 0 [Note] InnoDB: Mutexes and rw_locks use
Windows interlocked functions
2022-06-18 21:07:34 0 [Note] InnoDB: Uses event mutexes
2022-06-18 21:07:34 0 [Note] InnoDB: Compressed tables use zlib
1.2.11
2022-06-18 21:07:34 0 [Note] InnoDB: Number of pools: 1
2022-06-18 21:07:34 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-06-18 21:07:34 0 [Note] InnoDB: Initializing buffer pool, total
size = 16M, instances = 1, chunk size = 16M
2022-06-18 21:07:34 0 [Note] InnoDB: Completed initialization of
buffer pool
2022-06-18 21:07:34 0 [Note] InnoDB: 128 out of 128 rollback
segments are active.
2022-06-18 21:07:34 0 [Note] InnoDB: Creating shared tablespace for
temporary tables
2022-06-18 21:07:34 0 [Note] InnoDB: Setting file
'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the
file full; Please wait ...
2022-06-18 21:07:34 0 [Note] InnoDB: File
'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2022-06-18 21:07:34 0 [Note] InnoDB: Waiting for purge to start
2022-06-18 21:07:35 0 [Note] InnoDB: 10.4.24 started; log sequence
number 3046387; transaction id 1396
2022-06-18 21:07:35 0 [Note] InnoDB: Loading buffer pool(s) from
C:\xampp\mysql\data\ib_buffer_pool
2022-06-18 21:07:35 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-06-18 21:07:35 0 [Note] Server socket created on IP: '::'.
Hello!
Just do these simple steps:
Rename the folder C:\xampp\mysql\data to C:\xampp\mysql\data_old
(or any name)
Create new folder C:\xampp\mysql\data
Copy the content that is inside C:\xampp\mysql\backup to
C:\xampp\mysql\data folder
Copy all your database folders that are in C:\xampp\mysql\data_old to
C:\xampp\mysql\data (skip performance_schema, mysql and
phpmyadmin folders from C:\xampp\mysql\data_old)
Finally copy the ibdata1 file from C:\xampp\mysql\data_old and
replace it inside C:\xampp\mysql\data folder
Now Restart MySQL from XAMPP control panel.
And I am sure its all done...
I had the same problem today and i fixed it by deleting all master-xx.info files and the multi-master.info file in C:\xampp\mysql\data
After I started it again it made a new and empty multi-master.info file and it worked perfectly fine again. No Data was lost

MySQL from XAMPP not starting anymore. Port is not the problem

I'm using XAMPP for Windows and MySql was working fine for the longest time, but now (after a Windows update I think) it crashes on start-up. When I click on "Start" in the Control Panel, I get a short flash of the PID and Port 3306 before it shuts down again.
This is the error I get in XAMPP:
09:14:09 [mysql] Error: MySQL shutdown unexpectedly.
09:14:09 [mysql] This may be due to a blocked port, missing dependencies,
09:14:09 [mysql] improper privileges, a crash, or a shutdown by another method.
09:14:09 [mysql] Press the Logs button to view error logs and check
09:14:09 [mysql] the Windows Event Viewer for more clues
09:14:09 [mysql] If you need more help, copy and post this
09:14:09 [mysql] entire log window on the forums
This is the last entry in the error log:
2020-08-06 9:10:27 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-08-06 9:10:27 0 [Note] InnoDB: Uses event mutexes
2020-08-06 9:10:27 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-06 9:10:27 0 [Note] InnoDB: Number of pools: 1
2020-08-06 9:10:27 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-08-06 9:10:27 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-08-06 9:10:27 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-06 9:10:28 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-08-06 9:10:28 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-06 9:10:28 0 [Note] InnoDB: Setting file 'C:\Environment\XAMPP\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-06 9:10:28 0 [Note] InnoDB: File 'C:\Environment\XAMPP\mysql\data\ibtmp1' size is now 12 MB.
2020-08-06 9:10:28 0 [Note] InnoDB: Waiting for purge to start
2020-08-06 9:10:28 0 [Note] InnoDB: 10.4.13 started; log sequence number 40471727; transaction id 36256
2020-08-06 9:10:28 0 [Note] InnoDB: Loading buffer pool(s) from C:\Environment\XAMPP\mysql\data\ib_buffer_pool
2020-08-06 9:10:28 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-06 9:10:28 0 [Note] InnoDB: Buffer pool(s) load completed at 200806 9:10:28
2020-08-06 9:10:28 0 [Note] Server socket created on IP: '::'.
I have already checked the port (3306): Nothing is blocking it. I have no other instances of MySQL running on my computer. Neither in the Task-Manager nor in the services.msc. But just to be sure I changed the port for MySql to 3308, but it still wouldn't start.
I also tried deleting ibdata1, ib_logfile0,ib_logfile1,ib_logfile101 in xampp/mysql/data.
The last thing I tried was setting up IPv6 which I know was a hail mary.
Any help would be appreciated.
I solved it by doing this:
https://stackoverflow.com/a/11013868/11824001
And then following the error messages I was getting in PhPMyAdmin.
Turns out my mysql.db table was corrupted and had to be repaired with:
use mysql
repair table db;

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?
I found this helpful after searching for nearly an hour online.
You can go through the solution screenshotted here or browse the XAMPP forum here
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
Main issue that I faced is, some of my database size is to high.
But ibdata1 can not be auto extended.
So I did those step and my error was fixed.
Go to mysql/data folder
remove aria_log.00000001, aria_log_control, ib_logfile0, ib_logfile1, ibdata1, mysql.pid
Go to the my.ini from mysql/bin
Here you will find some buffer size related key values like->
key_buffer, max_allowed_packet, sort_buffer_size, net_buffer_length, read_buffer_size, read_rnd_buffer_size, myisam_sort_buffer_size, innodb_data_file_path, innodb_buffer_pool_size, innodb_log_file_size, innodb_log_buffer_size, innodb_lock_wait_timeout, max_allowed_packet
restart apache and mysql
check if it is solved or not.
100% worked for me.

mysqld.exe: Table '.\mysql\db' is marked as crashed and should be repaired

The MySQL service will no longer start on my XAMPP installation on a Windows 10 machine. The error message in the XAMPP console says:
Error: MySQL shutdown unexpectedly.
This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method.
The error log shows this:
InnoDB: using atomic writes.
2019-10-14 20:43:47 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2019-10-14 20:43:47 0 [Note] InnoDB: Uses event mutexes
2019-10-14 20:43:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-10-14 20:43:47 0 [Note] InnoDB: Number of pools: 1
2019-10-14 20:43:47 0 [Note] InnoDB: Using SSE2 crc32 instructions
2019-10-14 20:43:47 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2019-10-14 20:43:47 0 [Note] InnoDB: Completed initialization of buffer pool
2019-10-14 20:43:48 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-10-14 20:43:48 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-10-14 20:43:48 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-10-14 20:43:48 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2019-10-14 20:43:48 0 [Note] InnoDB: 10.4.6 started; log sequence number 6899920; transaction id 13408
2019-10-14 20:43:48 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2019-10-14 20:43:48 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-10-14 20:43:48 0 [Note] Server socket created on IP: '::'.
And the Windows Event Viewer contains 5 separate error messages:
mysqld.exe: Table '.\mysql\db' is marked as crashed and should be repaired
mysqld.exe: Index for table '.\mysql\db' is corrupt; try to repair it
Couldn't repair table: mysql.db
Fatal error: Can't open and lock privilege tables: Index for table 'db' is corrupt; try to repair it
Aborting
When an attempt is made to connect to MySQL, it doesn't work (which makes sense because the MySQL service will not run). This is the error message given in CMD after an attempt is made to connect: ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (10061).
Posts related to MySQL tables that need to be repaired require connecting to MySQL so they do not help in this situation. If it's possible to repair mysql.db on a Windows 10 machine without connecting to MySQL, what are the steps to do so?
This one helped for me:
Open shell from from control panel and start mysql with this command:
mysqld –-console –-skip-grant-tables –-skip-external-locking
Open another shell from control panel and repair database with this command:
mysqlcheck -r --databases mysql --use-frm
Stop mysql, close shells and restart mysql normally.
Posted in following:
https://stackoverflow.com/a/57001732