MySQL ERROR 1031 (HY000) at line 33: Table storage engine for

甲骨文技術支援發表於2017-04-27

今天從5.7mysqldump資料到5.6的時候遇到了ERROR 1031 (HY000) at line 33: Table storage engine for 'department' doesn't have this option錯誤

檢視department建表語句

  1. mysql> show create table department \G;
  2. *************************** 1. row ***************************
  3.        Table: department
  4. Create Table: CREATE TABLE `department` (
  5.   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '部門ID',
  6.   `code` varchar(64) NOT NULL COMMENT '組織結構code',
  7.   `name` varchar(90) NOT NULL COMMENT '部門名稱',
  8.   `fullid` varchar(255) NOT NULL,
  9.   `fullname` text NOT NULL COMMENT '包括所有上級機構名稱的全名稱',
  10.   `pid` int(11) NOT NULL COMMENT '父ID',
  11.   `level` int(11) NOT NULL COMMENT '部門級別',
  12.   `issub` tinyint(1) NOT NULL COMMENT '是否有下級 0:沒有 ; 1:有',
  13.   `del` tinyint(1) NOT NULL COMMENT '刪除標記:0否1是',
  14.   PRIMARY KEY (`id`),
  15.   KEY `fullid` (`fullid`),
  16.   KEY `pid_del_idx` (`pid`,`del`),
  17.   KEY `idx_del` (`del`)
  18. ) ENGINE=InnoDB AUTO_INCREMENT=847 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='部門表'

問題應該是出在row_format上,繼續查


  1. mysql> show variables like 'innodb_file_format';
  2. +--------------------+----------+
  3. | Variable_name | Value |
  4. +--------------------+----------+
  5. | innodb_file_format | Antelope |
  6. +--------------------+----------+
  7. 1 row in set (0.00 sec)
ROW_FORMAT=DYNAMIC應該檔案格式是barracude,修改之

  1. set global innodb_file_format=barracuda;
重新匯入,問題解決。



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20893244/viewspace-2138132/,如需轉載,請註明出處,否則將追究法律責任。

相關文章