MySQL 如何使用 Workbench 从服务器获取数据库的 ER 模型

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9589727/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 12:23:28  来源:igfitidea点击:

How to get ER model of database from server with Workbench

mysqlentity-relationshipmysql-workbench

提问by zdarsky.peter

Is there any way to get an ER model of a database from the server that is connected to my MySQL Workbench?

有没有办法从连接到我的 MySQL Workbench 的服务器获取数据库的 ER 模型?

回答by Kamran Ali

  1. Go to "Database" Menu option
  2. Select the "Reverse Engineer" option.
  3. A wizard will be open and it will generate the ER Diagram for you.
  1. 转到“数据库”菜单选项
  2. 选择“逆向工程师”选项。
  3. 将打开一个向导,它将为您生成 ER 图表。

回答by SkyWalker

I want to enhance Mr. Kamran Ali's answer with pictorial view.

我想用图片的观点来加强Kamran Ali先生的回答。

Pictorial View is given step by step:

图片视图是一步一步给出的:

  1. Go to "Database" Menu option
  2. Select the "Reverse Engineer" option.
  1. 转到“数据库”菜单选项
  2. 选择“反向工程”选项。

enter image description here

在此处输入图片说明

  1. A wizard will come. Select from "Stored Connection" and press "Next" button.
  1. 一个巫师会来。从“存储连接”中选择,然后按“下一步”按钮。

enter image description here

在此处输入图片说明

  1. Then "Next"..to.."Finish"
  1. 然后“下一步”...到...“完成

Enjoy :)

享受 :)

回答by Mahmoud Zalt

  1. Migrate your DB "simply make sure the tables and columns exist".
  2. Recommended to delete all your data (this freezes MySQL Workbench on my MAC everytime due to "software out of memory..")
  1. 迁移您的数据库“只需确保表和列存在”。
  2. 建议删除所有数据(由于“软件内存不足..”,每次都会在我的 MAC 上冻结 MySQL Workbench)


  1. Open MySQL Workbench
  2. click + to make MySQL connection
  3. enter credentials and connect
  4. go to database tab
  5. click reverse engineer
  6. follow the wizard Next > Next ….
  7. DONE :)
  8. now you can click the arrange tab then choose auto-layout (keep clicking it until you are satisfied with the result)
  1. 打开 MySQL 工作台
  2. 单击 + 进行 MySQL 连接
  3. 输入凭据并连接
  4. 转到数据库选项卡
  5. 点击逆向工程师
  6. 按照向导下一步>下一步...。
  7. 完毕 :)
  8. 现在您可以单击排列选项卡,然后选择自动布局(继续单击它直到您对结果感到满意)

回答by Harry_pb

On mac, press Command + Ror got to Database-> Reverse Engineerand keep selecting your requirements and continue

在 Mac 上,按Command + R或到Database->Reverse Engineer并继续选择您的要求和continue

enter image description here

在此处输入图片说明