MySQL tutorial _ MySQL

Source: Internet
Author: User
Tags mysql tutorial
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.