简体   繁体   English

如何获取mysql工作台中现有架构的脚本

[英]how to get script of existing schema in mysql workbench

I am using mysql5.6 workbench. 我正在使用mysql5.6工作台。 I have a schema and many tables in this schema. 我有一个架构和该架构中的许多表格。 Now I need to get the complete schema on my other system for which I need the script. 现在,我需要在需要脚本的其他系统上获得完整的架构。 I created all the tables without running the script so I don't have script. 我没有运行脚本就创建了所有表,因此没有脚本。 But now I want to generate the script from the workbench so that I can run it on another system. 但是现在我想从工作台生成脚本,以便可以在另一个系统上运行它。

please suggest me how I can get this script from mysql workbench 5.2CE. 请建议我如何从mysql workbench 5.2CE获取此脚本。

Also please help me to get it out in a .sql file format script. 另外,请帮助我以.sql文件格式脚本将其发布。

  1. Right click on the schema 右键单击架构
  2. Select "Send to SQL Editor" 选择“发送到SQL编辑器”
  3. Select "Create statement" 选择“创建语句”

If you want to generate a complete create script (ie including the tables), select the schema AND all the tables (hold down Ctrl to multiselect), then follow steps 1 through 3. 如果要生成完整的创建脚本(即包括表),请选择架构和所有表(按住Ctrl进行多选),然后按照步骤1到3进行操作。

Select the File, Export, Forward Engineer SQL CREATE Script menu item to start the Forward Engineer SQL 选择“文件,导出,正向工程师SQL CREATE脚本”菜单项以启动正向工程师SQL。

Get more details here 在这里获取更多详细信息

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

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