1194: Table 'name' is marked as crashed and should be repaired (테이블이 crashed로 표시되어 복구 필요)
MySQL의미
보통 MyISAM 엔진(MariaDB에서는 Aria도)으로 저장된 테이블이 손상/크래시로 표시되어 복구 전까지 사용할 수 없다. 테이블에 접근하는 쿼리가 이 오류로 실패한다.
원인
갑작스러운 서버 크래시/정전, 디스크 가득 참, 하드웨어 장애, mysqld 프로세스 kill로 MyISAM 테이블이 정상적으로 닫히지 않았다. MyISAM은 트랜잭션이나 크래시 안전성을 제공하지 않으므로 InnoDB보다 훨씬 자주 발생한다.
해결 방법
테이블을 복구한다: REPAIR TABLE table_name; 또는 오프라인에서 myisamchk -r. 복구 전에 항상 데이터 파일을 백업한다. 영구 조치로 테이블을 InnoDB로 옮긴다: ALTER TABLE my_table ENGINE=InnoDB; 이렇게 하면 크래시에 안전해진다. 디스크 상태와 myisam_recover_options 설정을 확인한다.
같은 데이터베이스의 다른 항목
- 1206The total number of locks exceeds the lock table size (전체 락 수가 락 테이블 크기 초과)
- 1236Got fatal error 1236 from master when reading data from binary log (binary log 읽기 중 master로부터 치명적 오류 1236 수신)
- 1129Host 'host' is blocked because of many connection errors (연결 오류가 많아 호스트 차단됨)
- 1615Prepared statement needs to be re-prepared (prepared statement 재준비 필요)
- 1553Cannot drop index needed in a foreign key constraint (외래 키 제약 조건에 필요한 인덱스 삭제 불가)
- 3948Loading local data is disabled; this must be enabled on both the client and server sides (로컬 데이터 로드가 비활성화됨. 클라이언트와 서버 양쪽에서 활성화 필요)
- 1075Incorrect table definition; there can be only one auto column and it must be defined as a key (잘못된 테이블 정의. auto 컬럼은 하나만 가능하며 키로 정의해야 함)