使用 Workbench 创建一个新的 MySQL 数据库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9087482/
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
Create a new MySQL database using Workbench
提问by jb.
I'm just trying to create a new MySQL database with a few simple tables.
我只是想用几个简单的表创建一个新的 MySQL 数据库。
I created a new EER Model in Workbench so I have the database modeled I want it, with all the tables/fields I need. I don't see any way to take the model and create an actual database out of it. Right now it just created a .mwb "MySQL Workbench file".
我在 Workbench 中创建了一个新的 EER 模型,因此我对数据库进行了建模,其中包含我需要的所有表/字段。我没有看到任何方法可以使用模型并从中创建实际的数据库。现在它刚刚创建了一个 .mwb “MySQL Workbench 文件”。
I saw this questionwhich is outdated as it's for Workbench (5.2.33) and it talks about "on the left pane there is a section titled 'Object' " which doesn't appear to exist in (5.2.36).
我看到这个问题已经过时了,因为它是针对 Workbench (5.2.33) 的,它谈到“在左窗格中有一个标题为‘对象’的部分”,它似乎不存在于 (5.2.36) 中。
Does Workbench even have the capabilities to create a database or is it only for connecting/editing existing databases? If Workbench can't create new databases, what is a simple tool that will?
Workbench 甚至具有创建数据库的功能还是仅用于连接/编辑现有数据库?如果 Workbench 不能创建新的数据库,那么有什么简单的工具可以呢?
I'm using MySQL Workbench (5.2.36) on Win 7.
我在 Win 7 上使用 MySQL Workbench (5.2.36)。
回答by Colin Brock
I believe you want to select the "Database" menu and then select "Forward Engineer".
我相信您要选择“数据库”菜单,然后选择“正向工程师”。
回答by Rizwan Shamsher Kaim Khani
Yes you may create database from MySQL workbench. steps are in below.
是的,您可以从 MySQL 工作台创建数据库。步骤如下。
In MySQL Work bench 6.0 CE.
在 MySQL 工作台 6.0 CE 中。
- You launch MySQL Workbench.
- From Menu Bar click on Database and then select "Connect to Database"
- It by default showing you default settings other wise you choose you host name, user name and password. and click to ok.
- As in above define that you should click write on existing database but if you don't have existing new database then you may choose the option from the icon menu that is provided on below the menu bar. Now keep the name as you want and enjoy ....
- 您启动 MySQL Workbench。
- 从菜单栏中单击数据库,然后选择“连接到数据库”
- 它默认显示默认设置,否则您选择主机名、用户名和密码。然后点击确定。
- 如上所述,您应该单击写入现有数据库,但如果您没有现有的新数据库,则可以从菜单栏下方提供的图标菜单中选择该选项。现在保留您想要的名称并享受......
If you have already made a database through phpmyadmin, wamp server and any way and you want to make the ER Diagram, you choose database and select Reverse Engineer and follow the steps you will get your tables with ER Diagram now you make relationships if not coming by default.
如果您已经通过 phpmyadmin、wamp 服务器和任何方式创建了一个数据库,并且您想要制作 ER 图表,请选择数据库并选择逆向工程师,然后按照以下步骤操作,您将获得带有 ER 图表的表格,如果不来,您可以建立关系默认情况下。
If you want to access your all database then select database menu and then select database connection, follow steps and provide info, you will get your list of all databases.
如果要访问所有数据库,请选择数据库菜单,然后选择数据库连接,按照步骤操作并提供信息,您将获得所有数据库的列表。
Thanks...
谢谢...
回答by Sergio
In Workbench's main menu select Database-> Forward Engineer. This should done what you ask for.
在 Workbench 的主菜单中选择Database-> Forward Engineer。这应该完成您的要求。