MySQL won't start

Problems with the Windows version of XAMPP, questions, comments, and anything related.

MySQL won't start

Postby nikkorian » 13. February 2020 02:38

MySQL was working yesterday. When I stopped work last night I put the machine into Sleep state.

Shortly afterwards, a service pack was installed by windows updater (automatic):
The process C:\Windows\System32\usocoreworker.exe (DTW7) has initiated the restart of computer DTW7 on behalf of user NT AUTHORITY\SYSTEM for the following reason: Operating System: Service pack (Planned)
Reason Code: 0x80020010


and

Package KB4537759 was successfully changed to the Installed state.


Today MySQL starts then dies. The event viewer reports, in order of the events, :

> 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


the MySQL log is unhelpful:

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


I am assuming the Windows update has contributed to the issue, but how it would corrupt a db file is mysterious. Perhaps MySQL was active when the machine rebooted?

Any help would be appreciated. My work is stopped till I get this sorted out.

Thanks
David
nikkorian
 
Posts: 4
Joined: 13. February 2020 02:00
XAMPP version: 3.2.4
Operating System: Win.10 64bit

Re: MySQL won't start

Postby nikkorian » 13. February 2020 06:26

UPDATE:

Since posting the above, I have restored my entire www folder (XAMPP installation folder) from 11:00pm last night, and again from 09:00pm last night, at which times I was working on my php and the db was working fine. I did not shutdown until just before 01:00am this morning.

After both restores, the db wouild not start with symptoms the same as this morning. The Window event viewer still reports corruption of the restored db, just as I listed above from this morning. Given the fact that the corruption is being reported from restored databases that were fine when the backups were taken, and the fact that the machine was in a sleep state when the windows update occurred so presumably MySQL was inactive and unlikely to be troubled by a system restart, I am suspecting that the event viewer reports are misleading and the problem lies elsewhere. But I still have no idea about a solution.
nikkorian
 
Posts: 4
Joined: 13. February 2020 02:00
XAMPP version: 3.2.4
Operating System: Win.10 64bit

Re: MySQL won't start

Postby nikkorian » 13. February 2020 08:43

FURTHER UPDATE:

I copied the entire www folder to a notebook that has not had the windows update (nothing since Jan) and the problem persists, i.e. MySQL starts then stops immediately with errors in the Windows event viewer reporting database corruption (see original post).

This suggests the problem is, in fact, in the WWW folder. I am at a loss in reconciling this with the fact that a restored installation from a backup of a working copy also shows the problem.

David
nikkorian
 
Posts: 4
Joined: 13. February 2020 02:00
XAMPP version: 3.2.4
Operating System: Win.10 64bit

Re: MySQL won't start

Postby nikkorian » 13. February 2020 11:24

the latest:

Basically it's all over. A fresh xampp installation followed by copying in the database folders and htdocs folders from a backup have me running again. I have lost my routines that are, apparently, stored in the mysql database somewhere. I tried bringing in the data\mysql folder but that caused it to crash again. So I have cut my losses. I can rebuild the routines from a database export from a few days ago.

Thanks for listening

David
nikkorian
 
Posts: 4
Joined: 13. February 2020 02:00
XAMPP version: 3.2.4
Operating System: Win.10 64bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 59 guests