MySQL WorkBench管理操作MySQL教程
MySQL Workbench提供DBAs和developers一個集成工具環(huán)境:
1)數(shù)據(jù)庫設(shè)計(jì)和建模
2)SQL開發(fā)(取代原來的MySQL Query Browser)
3)數(shù)據(jù)庫管理(取代原來的MySQL Administrator)

1)下載
下載: MySQL Workbench 6.09
地址:http://m.fzitv.net/database/29494.html
2)安裝

3) 入門數(shù)據(jù)庫實(shí)例 (sakila-db)
下載:http://mysql-tools.com/en/downloads/mysql-databases/4-sakila-db.html
三 MySQL Workbench 使用1)Server Administration
* 使用MySQLInstanceConfig配置MySQL以Service運(yùn)行;
* 然后使用MySQL Workbench的Server Administration的New Server Instance創(chuàng)建新的server實(shí)例@localhost;
* 使用MySQL Workbench的Server Administration的Data Dump來導(dǎo)入我們的數(shù)據(jù)庫實(shí)例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ù)庫實(shí)例sakila,如下:

* 在MySQL Workbench的SQL Development的環(huán)境中查詢數(shù)據(jù)庫實(shí)例sakila的actor表內(nèi)容,如下:

3)Data Modeling
* 使用MySQL Workbench的Data Modeling的open existing EER model來打開數(shù)據(jù)庫實(shí)例sakila中的sakila.mwb文件,如下圖:

* 通常地,我們使用MySQL Workbench的Data Modeling從建模開始來設(shè)計(jì)數(shù)據(jù)庫,在建模完成后導(dǎo)出為sql語句,然后再將sql導(dǎo)入到數(shù)據(jù)庫,來完成數(shù)據(jù)庫的創(chuàng)建;
完
相關(guān)文章
MySQL數(shù)據(jù)庫給表添加索引的實(shí)現(xiàn)
在MySQL中,索引是用來加速數(shù)據(jù)庫查詢的一種特殊數(shù)據(jù)結(jié)構(gòu),當(dāng)我們需要查詢數(shù)據(jù)庫中某些數(shù)據(jù)的時候,如果數(shù)據(jù)庫中有索引,就可以避免全表掃描,從而提高查詢速度,本文就介紹了如何給表添加索引,感興趣的可以了解一下2023-08-08
mysql 某字段插入隨機(jī)數(shù)(插入隨機(jī)數(shù)到MySQL數(shù)據(jù)庫)
這篇文章主要介紹了mysql 某字段插入隨機(jī)數(shù)(插入隨機(jī)數(shù)到MySQL數(shù)據(jù)庫),需要的朋友可以參考下2016-09-09
mysql如何根據(jù).frm和.ibd文件恢復(fù)數(shù)據(jù)表
這篇文章主要介紹了mysql根據(jù).frm和.ibd文件恢復(fù)數(shù)據(jù)表的操作方法,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2023-07-07
關(guān)于skip_name_resolve參數(shù)的總結(jié)分享
下面小編就為大家?guī)硪黄P(guān)于skip_name_resolve參數(shù)的總結(jié)分享。小編覺得挺不錯的,現(xiàn)在分享給大家。給大家一個參考。一起跟隨小編過來看看吧2016-03-03

