2016-10-04 19 views
0

DBのインポート中にエラーが発生しました。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とインポートされたスクリプトを削除しました。我々は、単一引用符をCOMMENT近くにエラーに直面しているテーブル定義を作成

`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`, 

のようなガット・エラーの一つで

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) 

:我々はまた、のようなエラーを得た

輸出入に何らかの問題があるように見えます。我々は160以上のテーブルを持っています。だからこの種のエラーが繰り返し私たちに影響を与えます。これに対する解決策はありますか?

+0

ダンプ済みのMySQL版です。 – khalid

+0

そのMySQl 5.7.11 – stefun

答えて

1

私は解決策を得ました。

phpmyadminを使用してインポート/エクスポートしていました。そこで私たちはこれらの問題に直面していました。

コマンドラインで試したところ、問題なくすべて正常に動作しました。輸出用

使用これを:インポート

mysqldump -u username -p databasename > filename.sql 

を使用この:

mysql -u username -p databasename < filename.sql 
0

テーブルが持っていたとき、特にこの場合には(特定のテーブルをエクスポートするbug occurred phpMyAdminのバージョンがありましたコメント)。このバグを修正した最新バージョンにアップグレードすることをお勧めします。

関連する問題