简体   繁体   English

MySQL转储错误1064(42000)

[英]MySQL Dump Error 1064 (42000)

I'm having a MySQL dump from Version 4.0.21. 我从版本4.0.21开始有MySQL转储。 I converted it to UTF-8 to fit with the special characters such as (Ü, ü, Ä, ä, Ö, ö, ß). 我将其转换为UTF-8以适应特殊字符,例如(Ü,ü,Ä,ä,Ö,ö,ß)。 Now I have to import it into the latest MySQL Version 5.5.36. 现在,我必须将其导入最新的MySQL版本5.5.36。 All data have been imported but an error occurred at the end. 所有数据已导入,但最后发生错误。

ERROR 1064 (42000) at line 80769: You have an error in your SQL syntax...use near '' at line 1 80769行出现错误1064(42000):您的SQL语法有错误...在第1行的''附近使用

The empty string and the line numbers are confusing me. 空字符串和行号使我感到困惑。 Importing with phpMyAdmin results the same as command line does, with the command: 使用phpMyAdmin导入的结果与命令行相同,使用以下命令:

mysql -u root -p bugtracker < E:\\mantisUTF.dump mysql -u root -p bugtracker <E:\\ mantisUTF.dump

The import with the original dump from Version 4.0.21 is working perfect but without the above mentioned special characters. 使用4.0.21版的原始转储进行的导入工作正常,但没有上述特殊字符。

First Lines of the dump file: 转储文件的第一行:

-- MySQL dump 9.11
--
-- Host: localhost    Database: Mantis
-- ------------------------------------------------------
-- Server version   4.0.21-debug

--
-- Table structure for table `mantis_bug_file_table`
--

Last Lines (80768 & 80769): 最后几行(80768&80769):

INSERT INTO mantis_user_table VALUES (57,'fullName','firstName lastName','emailAdress','dd1875c93e8f17a24ebaf9c902b7165a','2014-01-29 13:43:21','2014-03-26 13:22:47',1,0,55,14,0,0,'1b886436b0c62598ab66e40ae89f0c016dc5777ebb601a73f2a07536281113ae'

Thanks in advance. 提前致谢。

Relax 放松

By rechecking my question i found the problem. 通过重新检查我的问题,我发现了问题。 The problem was a missing ')' at the end of the dump file. 问题是转储文件末尾缺少')'。

Last line: 最后一行:

INSERT INTO mantis_user_table VALUES (57,'fullName','firstName lastName','emailAdress','dd1875c93e8f17a24ebaf9c902b7165a','2014-01-29 13:43:21','2014-03-26 13:22:47',1,0,55,14,0,0,'1b886436b0c62598ab66e40ae89f0c016dc5777ebb601a73f2a07536281113ae')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM