mysqlworkbench資料庫
Ⅰ 濡備綍鍦ㄧ數鑴戜腑涓嬭澆騫跺畨瑁匨ysql Workbench
MySQL Workbench鏄涓嬈句笓涓篗ySQL璁捐$殑ER/鏁版嵁搴撳緩妯″伐鍏鳳紝鏈変簺鏂扮敤鎴蜂笉鐭ラ亾濡備綍鍦ㄧ數鑴戜腑涓嬭澆騫跺畨瑁呰ヨ蔣浠訛紝鎺ヤ笅鏉ュ皬緙栧氨緇欏ぇ瀹朵粙緇嶄竴涓嬪叿浣撶殑鎿嶄綔姝ラゃ
鍏蜂綋濡備笅錛
1. 棣栧厛絎涓姝ユ墦寮鐢佃剳嫻忚堝櫒錛屾牴鎹涓嬪浘綆澶存墍鎸囷紝鍏堝湪鎼滅儲妗嗕腑杈撳叆銆恗ysql銆戱紝鎺ョ潃鐐瑰嚮銆怣ySQL瀹樼綉銆戦摼鎺ャ
2. 絎浜屾ヨ繘鍏ュ畼緗戝悗錛屾牴鎹涓嬪浘綆澶存墍鎸囷紝鐐瑰嚮銆怐OWNLOADS銆戦夐」銆
3. 絎涓夋ュ湪璺寵漿鐨勯〉闈涓錛屽厛婊戝姩鑷沖簳閮錛屾帴鐫鏍規嵁涓嬪浘綆澶存墍鎸囷紝鐐瑰嚮銆怣ySQL Community Edition銆戦夐」銆
4. 絎鍥涙ユ牴鎹涓嬪浘綆澶存墍鎸囷紝鐐瑰嚮銆怣ySQL Workbench銆戦夐」銆
5. 絎浜旀ュ湪璺寵漿鐨勯〉闈涓錛屾牴鎹涓嬪浘綆澶存墍鎸囷紝鎸夌収緋葷粺鐗堟湰涓嬭澆鐩稿叧杞浠躲
6. 絎鍏姝ヤ笅杞藉畬鎴愬悗錛屾牴鎹涓嬪浘綆澶存墍鎸囷紝鍙屽嚮杞浠跺畨瑁呭寘銆
7. 絎涓冩ユ墦寮銆愬畨瑁呫戠獥鍙e悗錛屾牴鎹涓嬪浘綆澶存墍鎸囷紝鐐瑰嚮銆怤ext銆戦夐」銆
8. 絎鍏姝ユ牴鎹涓嬪浘綆澶存墍鎸囷紝鎸夌収闇奼傝劇疆杞浠跺畨瑁呯洰褰曘
9. 絎涔濇ュ厛鎸夌収闇奼傞夋嫨瀹夎呯被鍨嬶紝鎺ョ潃鐐瑰嚮銆怤ext銆戦夐」銆傛牴鎹涓嬪浘綆澶存墍鎸囷紝灝忕紪浠ャ怌omplete銆戜負渚嬨
10. 絎鍗佹ユ牴鎹涓嬪浘綆澶存墍鎸囷紝鐐瑰嚮銆怚nstall銆戦夐」銆
11. 絎鍗佷竴姝ョ瓑寰呰蔣浠跺畨瑁呭畬鎴愶紝鏍規嵁涓嬪浘綆澶存墍鎸囷紝鐐瑰嚮銆怓inish銆戦夐」銆
12. 鏈鍚庢牴鎹涓嬪浘鎵紺猴紝鎴愬姛鎵撳紑銆怶orkbench銆戱紝鎸夌収闇奼傝繛鎺MySQL銆
Ⅱ mysqlworkbench鎬庝箞榪炴帴鏁版嵁搴
1銆侀栧厛鎴戜滑浣跨敤MySQL鎻愪緵鐨勫懡浠よ岀晫闈㈡潵瀵煎叆鏁版嵁搴擄紝紜淇濊嚜宸辯殑鐢佃剳涓瀹夎呬簡MySQL鏁版嵁搴擄紝鎴戜滑鍙浠ラ氳繃鍛戒護琛屾潵紜璁ゆ槸鍚﹀畨瑁呬簡MySQL鏁版嵁搴擄紝褰撶劧錛岀涓姝ユ槸鎵撳紑Mysql鐨勬暟鎹搴撴湇鍔★紝鎴戜滑浣跨敤鍛戒護琛屾潵鎵撳紑
2銆佸惎鍔∕ySQL鍚庯紝鎴戜滑鎵懼埌闇瑕佺敤鍒扮殑鑴氭湰鏂囦歡錛屼篃灝辨槸鏁版嵁搴撴枃浠訛紝褰撶劧錛屾垜浠棣栧厛寰楀緩絝嬩竴涓鏁版嵁搴擄紝榪欐牱鎵嶅彲浠ュ煎叆鑴氭湰銆
3銆佹垜浠鍦ㄥ皢鑴氭湰鎷峰埌鏈鍦扮佺洏鐨勬牴鐩褰曪紝榪欐牱鏂逛究榪涘叆鎵懼埌鑴氭湰錛岃繖閲屼互D鐩樻潵璇存槑錛屼嬌鐢╰est.sql:鎺ョ潃鎴戜滑鏉ュ埌鍛戒護琛岋紝浣跨敤SOURCE d:/test.sql;鏉ュ煎叆鏁版嵁搴,鍏堣繘鍏mysql
4銆侀栧厛瑕佸湪鏁版嵁搴撲腑寤虹珛濂芥暟鎹搴擄紝鐒跺悗瀵煎叆鑴氭湰錛屾墍浠ュ厛寤虹珛涓涓鏁版嵁搴撳摝錛屼笉瑕佽剼鏈鏄涓嶇煡閬撲綘瑕佸線鍝涓鏁版嵁搴撲腑瀵煎叆鑴氭湰鐨
5銆佺劧鍚庡氨鍙浠ヨ緭鍏ュ煎叆.sql鏂囦歡鍛戒護錛
mysql> USE 鏁版嵁搴撳悕;
mysql> SOURCE d:/test.sql;
鏂規硶浜岋細
1銆佷嬌鐢∟avicat for MySQL鍥懼艦鐣岄潰鏉ュ煎叆鏁版嵁搴擄紝浣跨敤鍥懼艦鐣岄潰瀵煎叆鏁版嵁搴撶殑姝ラゅ緢綆鍗
2銆佸湪鍥懼艦鐣岄潰涓寤虹珛濂芥暟鎹搴撲箣鍚庯紝鎴戜滑浣跨敤瀵煎叆鑴氭湰鐨勫姛鑳芥潵瀵煎叆鏁版嵁搴
3銆佺偣鍑婚夋嫨鑴氭湰錛屾垜浠閫夋嫨D鐩樼殑test.sql鑴氭湰錛岀劧鍚庤劇疆鏁版嵁搴撳瓧絎︽牸寮
4銆佹帴鐫鐐瑰嚮寮濮嬭繍琛岃剼鏈灝辮屼簡錛岃剼鏈寮濮嬪煎叆浜嗗摝!瀵煎叆瀹屾垚涔嬪悗灝變細鍑虹幇鎴愬姛鐨勬彁紺
5銆佺劧鍚庢垜浠鍏堝叧闂鏁版嵁搴擄紝鍐嶆墦寮鏁版嵁搴撳氨鍙浠ョ湅鍒板緩絝嬪ソ鐨勬暟鎹搴撶殑琛ㄤ簡