MySQL转储.sql脚本并导入到apache derby [英] MySQL dump .sql script and import to an apache derby

查看:179
本文介绍了MySQL转储.sql脚本并导入到apache derby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以推测 mysqldump 可以导出为 ansi compatible 格式,以便您可以导入到其他供应商的数据库。

So presumably mysqldump can export to ansi compatible format so that you can import to other vendors' databases.

但是尝试导入到apache derby我面对所有这些语法错误。
想到我尝试一些正则表达式并修复它,但似乎有一对夫妇。

However trying to import to an apache derby I face all this syntax errors. Thought I try some regex and fix things but it seems that there are more than a couple.

有没有什么我错过的mysqldump?
尝试 ddlutils ,但在步骤3之后无法使用这些 docs ,似乎过时。

Is there something I'm missing about mysqldump? Tried ddlutils but couldn't make progress after step 3 with these docs which seem out of date.

我有其他选择吗?

推荐答案

mysqldump 选项 - compatible = ansi 不会产生完全符合ANSI兼容性的SQL脚本,它只是尝试产生一个<更多 ANSI兼容性:产生与其他数据库系统或旧MySQL服务器更兼容的输出。

The mysqldump option --compatible=ansi doesn't produce a SQL script that is fully ANSI compatible, it just tries to produce a result that is more ANSI compatible: "Produce output that is more compatible with other database systems or with older MySQL servers."

不幸的是,支持的SQL语法每个数据库有点不同。 SQL是一个比较弱的标准,比Javascript甚至更弱C.一些数据库支持兼容性功能,如MySQL,甚至

Unfortunately, the SQL syntax supported by each database is a bit different. SQL is a relatively weak standard, much weaker than Javascript or even C. Some databases support compatibility features like MySQL does, or even compatibility modes (disclaimer: I'm the main author of H2), but even this is not enough sometimes.

您有多个选项:您可以手动更改生成的SQL脚本,也可以使用另一个工具复制表结构/数据。一个这样的工具是 SQuirreL DB Copy Plugin (我从来没有使用过,但从我听到的很好)。

You have multiple options: you could change the generated SQL script by hand, or you could use another tool to copy the table structure / data. One such tool is the SQuirreL DB Copy Plugin (I have never actually used it, but from what I heard it works well).

这篇关于MySQL转储.sql脚本并导入到apache derby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆