MySQL Workbench
MySQL Workbench provides an integrated tool environment for DBAs and developers:
1) database design and Modeling
2) SQL Development (replacing the original MySQL Query Browser)
3) Database Management (replacing the original MySQL Administrator)
2. Download and install MySQL Workbench
1) download
Download: MySQL Workbench 6.09
Address: http://www.jb51.net/database/29494.html
2) Installation
3) Getting Started database instance (sakila-db)
Download: http://mysql-tools.com/en/downloads/mysql-databases/4-sakila-db.html
Use MySQL Workbench
1) Server Administration
* Use MySQLInstanceConfig to configure MySQL to run as a Service;
* Create a New Server Instance @ localhost using the New Server Instance of MySQL Workbench server Administration;
* Use the Server Administration Data Dump of MySQL Workbench to import our database instance sakila-db. First, import the sakila schema, and then the sakila data. The import schema is as follows:
* The imported command line can be seen in the workbench log. The schema import is as follows:
Copy codeThe Code is as follows:
Mysql.exe -- defaults-extra-file = "c: \ users \ AAA \ appdata \ local \ temp \ tmph1_dop "-- host = localhost -- user = root -- port = 3306 -- default-character-set = utf8 -- comments <" E: \ mysql \ sakila-db \ sakila-schema. SQL"
Data Import is as follows:
Copy codeThe Code is 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-data. SQL"
* You can also use the Server Administration Data Dump of MySQL Workbench to export the database. There are two export formats: Export to dump project folder, and each table is an SQL file, the second type is self contained file, and all tables are exported as an SQL file;
2) SQL Development
* Use SQL Development's new connection of MySQL Workbench to create a link localhost and link to the previously imported database instance sakila, as shown below:
* Query the actor table of the database instance sakila in the SQL Development environment of MySQL Workbench, as follows:
3) Data Modeling
* Use the open existing EER model of Data Modeling of MySQL Workbench to open the sakila. mwb file in the database instance sakila, for example:
* Generally, we use the Data Modeling of MySQL Workbench to design a database from Modeling. After Modeling, we export the database as an SQL statement and then import the SQL statement to the database, to create a database;
End