系统环境:
操作系统: RedHat EL6.4(64)
WorkBench: mysql-workbench-community-6.0.9
MySQL Workbench是一款专为MySQL设计的ER/数据库建模工具。它是著名的数据库设计工具DBDesigner4的继任者。你可以用MySQL Workbench设计和创建新的数据库图示,建立数据库文档,以及进行复杂的MySQL 迁移。
MySQL Workbench是下一代的可视化数据库设计、管理的工具,它同时有开源和商业化的两个版本。该软件支持Windows和Linux系统。
对于Linux系统下的WorkBench安装比较容易,通过rpm安装就可以。
下载:MySQL官方网站
安装版本:mysql-workbench-community-6.0.9-1.el6.x86_64.rpm
一、安装
[root@rh64 mysql]# ls -l
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
total 124752
-rw-rw-r-- 1 mysql mysql 2329 Nov 23 16 : 14 join.sql
-rw-r----- 1 mysql mysql 38140 Oct 27 12 : 37 libev -4.04 -2. el6.x86_64.rpm
drwxr-xr-x 4 root root 4096 Oct 27 11 : 09 libev -4.15
-rw-r--r-- 1 mysql mysql 513919 Oct 27 11 : 05 libev -4.15. tar.gz
-rw-r----- 1 mysql mysql 43344 Dec 1 18 : 16 libzip -0.10. 1 -1.3. x86_64.rpm
-rw-r----- 1 mysql mysql 62768 Dec 1 18 : 05 libzip -0.11. 1 -3. fc20.x86_64.rpm
-rw-r----- 1 mysql mysql 24145 Dec 1 17 : 33 libzip -0.11. 2 -3.4. 1. x86_64.rpm
-rw-r----- 1 mysql mysql 65760 Dec 1 17 : 58 libzip -0.11. 2 -5. fc22.x86_64.rpm
-rw-r--r-- 1 mysql mysql 23770696 Dec 1 17 : 29 mysql-workbench-community -6.0. 9 -1. el6.x86_64.rpm
-rw-r--r-- 1 mysql mysql 18748620 Dec 1 17 : 23 mysql-workbench-community -6.2. 5 -1. el6.x86_64.rpm
-rwxrwxr-x. 1 mysql mysql 1593932 Sep 6 18 : 00 openssl -1.0. 1e-42. el6.x86_64.rpm
-rwxrwxr-x. 1 mysql mysql 6727084 Sep 6 17 : 39 Percona-Server-client -56 -5.6. 25 -rel73 .1. el6.x86_64.rpm
-rwxrwxr-x. 1 mysql mysql 20463420 Sep 6 17 : 40 Percona-Server-server -56 -5.6. 25 -rel73 .1. el6.x86_64.rpm
-rwxrwxr-x. 1 mysql mysql 742496 Sep 6 17 : 40 Percona-Server-shared -56 -5.6. 25 -rel73 .1. el6.x86_64.rpm
-rw-rw-r-- 1 root root 5664452 Oct 17 02 : 50 percona-xtrabackup -2.3. 2 -1. el6.x86_64.rpm
-rw-r----- 1 mysql mysql 27453440 Oct 27 11 : 40 Percona-XtraBackup -2.3. 2 -r306a2e0-el6-x86_64-bundle.tar
-rw-rw-r-- 1 root root 20807976 Oct 17 02 : 50 percona-xtrabackup-debuginfo -2.3. 2 -1. el6.x86_64.rpm
-rw-rw-r-- 1 root root 971264 Oct 17 02 : 50 percona-xtrabackup-test -2.3. 2 -1. el6.x86_64.rpm
-rw-rw-r-- 1 mysql mysql 2286 Nov 23 16 : 34 scott.sql
drwxrwxr-x 2 mysql mysql 4096 Oct 27 10 : 27 XtraBackup
|
安装需要libzip.so.1(64)的支持,libzip可以到以下网站下载:
安装libzip:
[root@rh64 mysql]# rpm -ivh libzip-0.9-1.el5.rf.x86_64.rpm
warning: libzip-0.9-1.el5.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing... ########################################### [100%]
package libzip-0.10.1-1.3.x86_64 (which is newer than libzip-0.9-1.el5.rf.x86_64) is already installed
file /usr/bin/zipcmp from install of libzip-0.9-1.el5.rf.x86_64 conflicts with file from package libzip-0.10.1-1.3.x86_64
file /usr/bin/zipmerge from install of libzip-0.9-1.el5.rf.x86_64 conflicts with file from package libzip-0.10.1-1.3.x86_64
file /usr/bin/ziptorrent from install of libzip-0.9-1.el5.rf.x86_64 conflicts with file from package libzip-0.10.1-1.3.x86_64
file /usr/share/man/man1/zipcmp.1.gz from install of libzip-0.9-1.el5.rf.x86_64 conflicts with file from package libzip-0.10.1-1.3.x86_64
file /usr/share/man/man1/zipmerge.1.gz from install of libzip-0.9-1.el5.rf.x86_64 conflicts with file from package libzip-0.10.1-1.3.x86_64
file /usr/share/man/man1/ziptorrent.1.gz from install of libzip-0.9-1.el5.rf.x86_64 conflicts with file from package libzip-0.10.1-1.3.x86_64
与系统文件冲突,可以采用强制安装:
[root@rh64 mysql]# rpm -ivh libzip-0.9-1.el5.rf.x86_64.rpm --force
warning: libzip-0.9-1.el5.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing... ########################################### [100%]
1:libzip ########################################### [100%]
[root@rh64 mysql]# find / -name "libzip.so*"
/u01/app/oracle/product/11.2.0/db_1/jdk/jre/lib/amd64/libzip.so
/usr/lib64/libzip.so.1
/usr/lib64/libzip.so.1.0.0
/usr/lib64/libzip.so.2.1.0
/usr/lib64/libzip.so.2
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/lib/amd64/libzip.so
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/libzip.so
安装WorkBench:
[root@rh64 mysql]# rpm -ivy mysql-workbench-community-6.0.9-1.el6.x86_64.rpm
-ivy: unknown option
[root@rh64 mysql]# rpm -ivh mysql-workbench-community-6.0.9-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:mysql-workbench-communi########################################### [100%]
二、Workbench会用到mysql utilities
安装mysql utilities:(下载地址mysql官方网站)
[root@rh64 mysql]# rpm -ivh mysql-utilities-1.5.6-1.el6.noarch.rpm
warning: mysql-utilities-1.5.6-1.el6.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
mysql-connector-python >= 2.0.4 is needed by mysql-utilities-1.5.6-1.el6.noarch
首先要安装connector-python:(下载地址mysql官方网站)
[root@rh64 mysql]# rpm -ivh mysql-connector-python-2.1.3-1.el6.x86_64.rpm
warning: mysql-connector-python-2.1.3-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-connector-python ########################################### [100%]
[root@rh64 mysql]# rpm -ivh mysql-utilities-1.5.6-1.el6.noarch.rpm
warning: mysql-utilities-1.5.6-1.el6.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-utilities ########################################### [100%]
三、MySQL WorkBench工作界面
连接数据库:
连接成功,管理数据库: