MySQL WorkBench管理操作MySQL教程
MySQL Workbench提供DBAs和developers一個(gè)集成工具環(huán)境:
1)數(shù)據(jù)庫設(shè)計(jì)和建模
2)SQL開發(fā)(取代原來的MySQL Query Browser)
3)數(shù)據(jù)庫管理(取代原來的MySQL Administrator)
1)下載
下載: MySQL Workbench 6.09
地址:http://www.dbjr.com.cn/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"
* 同時(shí)也可以使用MySQL Workbench的Server Administration的Data Dump來導(dǎo)出數(shù)據(jù)庫,導(dǎo)出有兩種格式,第一為導(dǎo)出到dump project folder,每個(gè)表為一個(gè)sql文件,第二種為導(dǎo)出為self contained file,所有的表導(dǎo)出為一個(gè)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)文章
深入sql數(shù)據(jù)連接時(shí)的一些問題分析
本篇文章是對(duì)關(guān)于sql數(shù)據(jù)連接時(shí)的一些問題進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下2013-06-06MySQL處理DB讀寫分離數(shù)據(jù)不一致問題的方案
在互聯(lián)網(wǎng)中大型項(xiàng)目中,讀寫分離應(yīng)該是我們小伙伴經(jīng)常聽說的,這個(gè)主要解決大流量請(qǐng)求時(shí),提高系統(tǒng)的吞吐量,本文給大家介紹了MySQL處理DB讀寫分離數(shù)據(jù)不一致問題的方案,需要的朋友可以參考下2024-02-02mysql 5.7.18 安裝配置方法圖文教程(CentOS7)
這篇文章主要為大家詳細(xì)介紹了CentOS 7下mysql 5.7.18 安裝配置方法圖文教程,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-04-04Windows下MySQL?8.0.29?安裝和刪除圖文教程
這篇文章主要為大家詳細(xì)介紹了Windows下MySQL?8.0.29?安裝和刪除圖文教程,文中安裝步驟介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-07-07