MySQLWorkBench MySQL tutorial bitsCN.com
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.bitsCN.com/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:
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-schema. SQL"
Data import 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
BitsCN.com