fix unknown table engine innodb

Hệ thống đang hoạt động bình thường. Nếu xảy ra lỗi “unknown table engine ‘innodb’ ”. Xử lý như sau:
1. Kiểm tra innodb có hoạt động không?
mysql> SHOW VARIABLES LIKE 'have_innodb';
   +---------------+-------+
   | Variable_name | Value |
   +---------------+-------+
   | have_innodb   | NO   |
   +---------------+-------+
--> disabled.

2. Xác định nguyên nhân (show log)
tail -200 /var/lib/mysql/$hostname.err
$hostname là hostname của server bạn.
Một số trường hợp gây ra lỗi:
a. Dung lượng file khai báo trong file /etc/my.cnf khác với dung lượng file thực tế:
  InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
  InnoDB: than specified in the .cnf file 0 2097152 bytes!
  110806 15:06:25 [ERROR] Plugin 'InnoDB' init function returned error.
  110806 15:06:25 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
==> Comment dòng sau trong /etc/my.cnf
#innodb_log_file_size = 256M
b. Ổ cứng full:
130510 17:55:25 [ERROR] /usr/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs
130510 18:09:15 [ERROR] /usr/libexec/mysqld: Disk is full writing ‘./mysql-bin.000014‘ (Errcode: 28). Waiting for someone to free space… (Expect up to 60 secs delay for server to continue after freeing disk space)
==> Mở rộng dung lượng ổ hoặc move thư mục/usr/local/mysql/data sang phân vùng dung lượng lớn hơn


No comments:

Post a Comment