MySQL 如何在一个 SQL 文件中从 DataGrip 导出数据库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38962507/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to export a data base from DataGrip at one SQL file?
提问by Siricks
How I can export a data base from DataGrip at one SQL file as phpmyadmin export?
如何将 DataGrip 中的数据库导出到一个 SQL 文件中作为 phpmyadmin 导出?
If I use Dump Data To Files, DataGrip save one table at one file.
如果我使用 Dump Data To Files,DataGrip 会将一张表保存在一个文件中。
And how I can create backup of all MySQL databases, which open in DataGrip?
以及如何创建在 DataGrip 中打开的所有 MySQL 数据库的备份?
回答by Daniell
回答by ulrichenslin
Running DataGrip 2016.2.5 you can select sever tables and right click->Copy DDL. That puts a drop/create script on the clipboard, which you can then paste into a text file.
运行 DataGrip 2016.2.5 可以选择服务器表并右键单击->复制 DDL。这会在剪贴板上放置一个放置/创建脚本,然后您可以将其粘贴到文本文件中。
回答by groundh0g
I just got the DataGrip 2016.2.1 update this morning. It looks like the feature has been added (at least for SQL SERVER, the only one I tested). It wasn't available in the previous version - I tried.
我今天早上刚收到 DataGrip 2016.2.1 更新。看起来该功能已添加(至少对于 SQL SERVER,我测试的唯一一个)。它在以前的版本中不可用 - 我试过了。
Select a range of tables and right-click on them, or right-click on the database name. The Dump Data to Files
option is now there.
选择一系列表并右键单击它们,或右键单击数据库名称。该Dump Data to Files
选项是现在。
Unfortunately, it still dumps to multiple files. But it beats the heck out of right-clicking on each table in turn.
不幸的是,它仍然转储到多个文件。但它击败了依次右键单击每个表。