Mysql导入时出错

标签 mysql wordpress import phpmyadmin

我正在尝试在 Window 7 系统上本地导入从 Wordpress 博客获取的 Mysql 数据。它以一种或另一种方式给出错误。

wp_commentmeta 表出错。我已经删除了所有 aksimet 行,但仍然出现错误。因此,退出该表并包含其他表。但是现在也出现了错误,我不明白:

Error: There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below: ----BEGIN CUT---- eNo1jTsKwzAQRAPu9hRzACEs2S6ynRDCDugXSYlPkCKN+9w+ciBTDY/HjCslFYZVsBreRYaChlJU W8cDUfjUu2cscpGTpkctSFXArC42gafr0v4+YLeSguvWKKeRcjCMufdZKspbPj2R6rnSyRX7LcZG 3sSV8Trod0DD5Z8vxK4ftA== ----END CUT---- ----BEGIN RAW---- ERROR: C1 C2 LEN: 1 2 11 STR: MySQL: 5.5.32 USR OS, AGENT, VER: Win CHROME 5.0.30 PMA: 4.0.4.1 PHP VER,OS: 5.4.19 WINNT LANG: en SQL:
----END RAW---- SQL query: MySQL said: Documentation
#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 1

错误来自 PHPMyAdmin。

最佳答案

只是给大家的警告信息。我记得,我过去常常使用命令行,而不是像 phpMyAdmin 这样的任何工具。今天 phpMyAdmin 花了很多时间。 phpMyAdmin 没有正确导出,所有问题都是因为这个。

甚至 phpMyadmin 也无法导入自己导出的数据。我使用了 mysqldump,然后是 mysql ... db < sql.sql,它以闪电般的速度运行。

#mysqldump -u userName -p --add-drop-table --insert-ignore --result-file downloads/db_name_dump-oct-14.sql db_name

然后使用 FileZilla 下载文件, 在 Wins 7 上:

>mysql -u root -proot  wordpress < db_name_dump-oct-14.sql

记住,最后不要给分号。

关于Mysql导入时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19344512/

相关文章:

mysql - 使用空值将表转换为 CSV 引擎

mysql - 如何使用 Hibernate 在 MySQL 中获取自增主键值

mysql - 表之间的多个连接

wordpress - 错误 Woocommerce REST API 扩展订单 "line_items"响应

php - 帖子缩略图的强制大小

php - 如何公开要从 Wordpress 管理面板运行的 Swift 代码(iOS 应用程序),如 php 服务器代码

java - 太多的导入垃圾邮件我的 Java 代码

java - 如何使用从表中选择数据,进行计算,然后将新数据更新到与第一个主键相同的另一个表中?

java - 在Java中更改导入名称,或导入两个同名的类

swift - 这是什么意思 ?声明仅在文件范围内有效