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