MySQL 4.1이 "데이터베이스가 정상적으로 종료되지 않았습니다!"라는 메시지와 함께 충돌합니다.

MySQL 4.1이 "데이터베이스가 정상적으로 종료되지 않았습니다!"라는 메시지와 함께 충돌합니다.

때때로 내 MySQL 4.1 Windows 서비스가 로그 내부에 다음 줄과 함께 충돌합니다.

091218  9:31:25  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
091218  9:31:33  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 2 817025450.
InnoDB: Doing recovery: scanned up to log sequence number 2 817025450
091218  9:31:35  InnoDB: Flushing modified pages from the buffer pool...
091218  9:31:35  InnoDB: Started; log sequence number 2 817025450
C:\Programme\MySQL\MySQL Server 4.1\bin\mysqld-nt: ready for connections.
Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary

100107  9:02:51  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
100107  9:02:53  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 2 953338420.
InnoDB: Doing recovery: scanned up to log sequence number 2 953338420
100107  9:02:53  InnoDB: Flushing modified pages from the buffer pool...
100107  9:02:53  InnoDB: Started; log sequence number 2 953338420
C:\Programme\MySQL\MySQL Server 4.1\bin\mysqld-nt: ready for connections.
Version: '4.1.14-nt'  socket: ''  port: 3306  Official MySQL binary

해당 메시지는 특정 문제를 가리키는 것이 아닙니다. 충돌의 원인을 추적하려면 어떻게 해야 합니까?

답변1

  1. 데이터베이스 중지

  2. 데이터베이스를 덤프(또는 백업)합니다.

  3. data(windows) 또는 /var(UNIX) 디렉터리의 모든 항목을 제거합니다.

  4. db를 다시 시작하십시오 (이제 db가 시작됩니다)

  5. mysql 디렉토리를 복원하십시오.

  6. DB 중지

  7. 다른 데이터베이스 및 테이블 복원

  8. DB 시작

답변2

설정을 지정 innodb_force_recovery=2하고 mysql 덤프를 수행하고 원본 데이터베이스 디렉터리를 삭제한 후 가져오기를 사용하여 다시 생성해야 한다고 생각합니다.이 기사더 자세한 단계가 있습니다.

관련 정보