Question

I have an .sql script that contains inserts and creates tables. I used the "Create EER Model From Script"

It created the tables but I can't see the data inside these tables.

I went to the query menu and tried to make a query but it gives me an error about not being able to connect to localhost.

Am I doing it right?

Was it helpful?

Solution

As documented under Create EER Model from SQL Script:

Clicking this action item launches the Reverse Engineer SQL Script wizard. This is a multi-stage wizard that enables you to select the script you want to create your model from.

For further information, see Section 7.7.9.1, “Reverse Engineering Using a Create Script”.

Following that link:

However, if you are working with a script that also contains DML statements you need not remove them; they will be ignored.

Instead, you want the Manage Data Import/Export option under Server Administration (within the Workspace section of the Home window).

OTHER TIPS

You are confusing things here. Creating a model from a script is a process where meta data is examined and a model is created that you can then use to modify your schema structure, further design your db objects and all that. Modeling is a design process for the structure of your schema/db so it only deals with meta data. It's also used for documentation (e.g. in teams).

On the other hand there's normal sql work with existing db objects and/or actually creating/deleting/modifying db objects. In order to do the latter you must have an understanding of the design of the schema (which you could get by using the modeling part of MySQL Workbench, but not only by that). This is also the place to load a script, run it to insert data and such.

The error you mentioned regarding the connection is yet another problem and you need to solve this first to be able to even access your server. And yes, you have to install a server first somewhere. MySQL Workbench is a tool to visually work with your server(s) in opposition to the MySQL command line client which is a pure text interface (but still also a client application for your MySQL servers).

If you are on Windows and want a MySQL server installed locally (e.g. for testing) your best option is to download the MySQL Installer which greatly simplifies installing any of the tools from the MySQL family (server, client tools, connectors, documentation and more).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top