Search code examples
mysqlwindowsstartuposerror

MySQL can not start the server


When starting MySQL server it crashes, there is full log:

2021-08-16T11:49:20.983309Z 0 [System] [MY-010116] [Server] c:\openserver\modules\database\MySQL-8.0-Win10\bin\mysqld.exe (mysqld 8.0.24) starting as process 9160
2021-08-16T11:49:21.044642Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-08-16T11:50:11.932767Z 1 [ERROR] [MY-012611] [InnoDB] Operating system error number 1117 in a file operation.
2021-08-16T11:50:11.934157Z 1 [ERROR] [MY-012646] [InnoDB] File (unknown): 'flush' returned OS error 1217. Cannot continue operation
2021-08-16T11:50:11.934525Z 1 [ERROR] [MY-012981] [InnoDB] Cannot continue operation.

After countless google pages i did not find a solution...and this log is "very" informative, so no useful information about error from this... also according to MSDN:

ERROR_INVALID_MESSAGENAME

1217 (0x4C1)

The format of the specified message name is invalid.

also not very useful... What i tried:

  1. Delete log files (ib_logfile0, ib_logfile1, ib_logfile101)
  2. Delete tmp file (ibtmp1)
  3. Reinstall MySQL server
  4. Try every value of innodb_force_recovery parameter from 1 to 6
  5. Check permissions of MySQL folder and all of its file for write and read
  6. Run chkdsk /F /R, rebooting computer and repeating all of the above

I`m running Windows 10 Home 20H2


Solution

  • Problem was in my 7yr old HDD, replaced it with new one and everything works now