我們在導入數據庫時遇到一些錯誤。在Mysql 5.7中導入MySql轉儲時出錯
CREATE TABLE `pf_class_room` (
`id` int(11) NOT NULL,
`class_name` varchar(500) DEFAULT NULL,
`class_min_limit` int(11) DEFAULT '0',
`class_max_limit` int(11) NOT NULL,
`class_from_date` date DEFAULT NULL,
`class_from_time` time DEFAULT NULL,
`class_to_date` date DEFAULT NULL,
`class_to_time` time DEFAULT NULL,
`class_address` varchar(1000) DEFAULT NULL,
`class_country` varchar(50) DEFAULT NULL,
`class_city` varchar(50) DEFAULT NULL,
`class_pin` varchar(10) DEFAULT NULL,
`class_course` int(11) DEFAULT NULL,
`class_trainer` int(11) DEFAULT NULL,
`cost` int(11) NOT NULL,
`costformat` varchar(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT '0'COMMENT
)
#1064 - 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 ')' at line 19
這裏我們刪除了COMMENT
和導入的腳本。
我們還得到了錯誤,如:
2 errors were found during analysis.
Ending quote ' was expected. (near "" at position 15650)
7 values were expected, but found 6. (near "(" at position 15576)
在創建表定義的一個
`future_courses` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT AS `Scope or Eligibility for certain courses in the future`,
了錯誤,如
#1064 - 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 'AS `Scope or Eligibility for certain courses in the future`,
我們正面臨着誤差接近評論,單引號等等。它看起來像出口或進口的一些問題。我們有超過160張桌子。所以這種錯誤反覆影響着我們。任何解決方案?
您已轉儲表的MySQL版本。 – khalid
其MySQl 5.7.11 – stefun