1)數(shù)據(jù)庫設(shè)計和建模
2)SQL開發(fā)(取代原來的MySQL Query Browser)
3)數(shù)據(jù)庫管理(取代原來的MySQL Administrator)
1)下載
下載: MySQL Workbench 6.09
地址:http://www.bitsCN.com/database/29494.html
2)安裝
3) 入門數(shù)據(jù)庫實例 (sakila-db)
下載:http://mysql-tools.com/en/downloads/mysql-databases/4-sakila-db.html
三 MySQL Workbench 使用* 使用MySQLInstanceConfig配置MySQL以Service運行;
* 然后使用MySQL Workbench的Server Administration的New Server Instance創(chuàng)建新的server實例@localhost;
* 使用MySQL Workbench的Server Administration的Data Dump來導(dǎo)入我們的數(shù)據(jù)庫實例sakila-db,首先導(dǎo)入sakila schema,然后導(dǎo)入sakila data,導(dǎo)入schema如下圖:
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"
data的導(dǎo)入如下:
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"
* 同時也可以使用MySQL Workbench的Server Administration的Data Dump來導(dǎo)出數(shù)據(jù)庫,導(dǎo)出有兩種格式,第一為導(dǎo)出到dump project folder,每個表為一個sql文件,第二種為導(dǎo)出為self contained file,所有的表導(dǎo)出為一個sql文件;
2)SQL Development
* 使用MySQL Workbench的SQL Development的 new connection來創(chuàng)建鏈接localhost,鏈接到先前導(dǎo)入的數(shù)據(jù)庫實例sakila,如下:
* 在MySQL Workbench的SQL Development的環(huán)境中查詢數(shù)據(jù)庫實例sakila的actor表內(nèi)容,如下:
3)Data Modeling
* 使用MySQL Workbench的Data Modeling的open existing EER model來打開數(shù)據(jù)庫實例sakila中的sakila.mwb文件,如下圖:
* 通常地,我們使用MySQL Workbench的Data Modeling從建模開始來設(shè)計數(shù)據(jù)庫,在建模完成后導(dǎo)出為sql語句,然后再將sql導(dǎo)入到數(shù)據(jù)庫,來完成數(shù)據(jù)庫的創(chuàng)建;
完
bitsCN.com聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com