Windows에서 개발용 MySQL 서버를 사용중이다.
평소 꺼놓고 있다가 필요시 켜는데, 가끔 아래 오류로 시작을 거부한다.
Missing MLOG_CHECKPOINT at XXX between the checkpoint XXX and the end XXX.
[Note] Starting MariaDB 10.4.28-MariaDB source revision XXX as process XXX [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions [Note] InnoDB: Uses event mutexes [Note] InnoDB: Compressed tables use zlib 1.2.12 [Note] InnoDB: Number of pools: 1 [Note] InnoDB: Using SSE2 crc32 instructions [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M [Note] InnoDB: Completed initialization of buffer pool [ERROR] InnoDB: Missing MLOG_CHECKPOINT at ### between the checkpoint ### and the end ###. [ERROR] InnoDB: Plugin initialization aborted with error Generic error [Note] InnoDB: Starting shutdown... [ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. [Note] Plugin 'FEEDBACK' is disabled. [ERROR] Unknown/unsupported storage engine: InnoDB [ERROR] Aborting
원인
InnoDB 플러그인 시작 중에, InnoDB 트랜잭션 로그가 손상된 것을 발견하고서 abort 함. 이 때문에 InnoDB 엔진이 비활성 상태가 됨.
1차 조치
먼저, 백업이 필요하면 백업을 한 후.
MySQL 데이터 경로의 아래 2개 파일을 삭제 후 재시작 해본다.
- ib_logfile0
- ib_logfile1
2차 조치
여전히 시작 불능이면 InnoDB Recovery mode 활성화 해봄
my.cnf 또는 my.ini 파일의 [mysql] 섹션에 아래 라인 추가 후 재시작
innodb_force_recovery = 1