【发布时间】:2015-09-09 09:36:33
【问题描述】:
我已经从 MySQL 5.5.40 版本导出了一个数据库,但是当我将它导入 MySQL 5.5.44 时,我收到了关于语法的错误。
CREATE TABLE IF NOT EXISTS `key_value` (
`collection` varchar(128) CHARACTER SET ascii NOT NULL DEFAULT '' COMMENT 'A named collection of key and value pairs.'
`value` longblob NOT NULL COMMENT 'The value.',
PRIMARY KEY (`collection`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Generic key-value storage table. See the state system for…';
收到的错误是:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`value` longblob NOT NULL COMMENT 'The value.',
PRIMARY KEY (`collection`,`nam' at line 3
请提出建议。
【问题讨论】:
-
你在值 longblob 之前错过了逗号 ',' ...