A MySQL Workbench
MySQL Workbench provides DBAs and developers an integrated tool environment:
1 Database design and modeling
2 SQL Development (replaces the original MySQL Query Browser)
3 database Management (replace the original MySQL administrator)
two MySQL Workbench download and install
1) Download
Download: MySQL Workbench 6.09
Address: http://www.jb51.net/database/29494.html
2) Installation
3 Entry Database instance (SAKILA-DB)
Download: http://mysql-tools.com/en/downloads/mysql-databases/4-sakila-db.html
three MySQL Workbench use
1) Server Administration
* Use Mysqlinstanceconfig to configure MySQL to run with service;
* Then create a new server instance @localhost using the MySQL Workbench Server Administration instance;
* Use the MySQL Workbench Server Administration data dump to import our database instance sakila-db, first import the Sakila schema, and then import Sakila data, Import schema as shown below:
* The imported command line can be seen in Workbench Log, and the schema is imported as follows:
Copy Code code as follows:
Mysql.exe--defaults-extra-file= "C:\users\AAA\appdata\local\temp\tmphjwdop"--host=localhost--user=root--port= 3306--default-character-set=utf8--comments < "E:\\mysql\\sakila-db\\sakila-db\\sakila-schema.sql"
The data is imported as follows:
Copy Code code as follows:
Mysql.exe--defaults-extra-file= "c:\users\AAA\appdata\local\temp\tmpbsop_e"--host=localhost--user=root--port= 3306--default-character-set=utf8--comments < "E:\\mysql\\sakila-db\\sakila-db\\sakila-data.sql"
* You can also use the MySQL Workbench Server administration data dump to export the database, export there are two formats, the first is exported to dump project folder, each table is a SQL file, The second is exported to self contained file, and all tables are exported as one SQL file;
2) SQL Development
* Create a link localhost using the new connection of the MySQL Workbench SQL development, linked to the previously imported database instance Sakila, as follows:
* Query the actor table contents of the database instance Sakila in the MySQL Workbench SQL development environment, as follows:
3) Data Modeling
* Use the MySQL Workbench Data modeling's open existing EER model to open the Sakila file in the database instance SAKILA.MWB, as shown in the following figure:
* Typically, we use the MySQL Workbench data modeling to design a database from modeling, export it as a SQL statement after modeling, and then import SQL into the database to complete the creation of the database;
Finish