Create a new MySQL database using Workbench

狂风中的少年 提交于 2019-12-12 10:39:53

问题


I'm just trying to create a new MySQL database with a few simple tables.

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".

I saw this question which 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).

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?

I'm using MySQL Workbench (5.2.36) on Win 7.


回答1:


I believe you want to select the "Database" menu and then select "Forward Engineer".




回答2:


Yes you may create database from MySQL workbench. steps are in below.

In MySQL Work bench 6.0 CE.

  1. You launch MySQL Workbench.
  2. From Menu Bar click on Database and then select "Connect to Database"
  3. It by default showing you default settings other wise you choose you host name, user name and password. and click to ok.
  4. 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 ....

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.

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...




回答3:


In Workbench's main menu select Database -> Forward Engineer. This should done what you ask for.



来源:https://stackoverflow.com/questions/9087482/create-a-new-mysql-database-using-workbench

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!