centOS下安裝mysql workbench詳細步驟


step0:安裝mysql

在按照workbench之前,先安裝mysql。指令是

yum install mysql mysql-server mysql-libs mysql-server

關於mysql各個包的功能是:

“mysql for the client tools, mysql-server for the server and associated tools, and mysql-libs for the libraries. The libraries are required if you want to provide connectivity from different languages and environments such as Perl, Python and others.”

用yum指令安裝的好處是比較方便,壞處是一般yum指令安裝的版本都比最新版稍微落后些……

terminal提示complete以后,就說明安裝完了。mysql的配置文件被安裝到/etc/my.cnf,mysql server的啟動腳本被安裝到/etc/init.d/mysqld

官方說明:

A sample configuration file is installed into /etc/my.cnf. An init script, to start and stop the server, will have been installed into /etc/init.d/mysqld.

啟動MySQL server的命令是:

root-shell> service mysqld start

如果想在centOS開機時自動啟動MySQL server,那么可以使用指令

root-shell> chkconfig --levels 235 mysqld on

mysql和 mysq lserver裝好以后就可以裝workbench了。

step1:到mysql的官網上下載workbench安裝文件

http://dev.mysql.com/downloads/mirror.php?id=412155

step2:下載好了以后,點擊安裝

雙擊下載的文件,即可安裝

會提示需要額外安裝的package,點擊install就好。

提示需要輸入密碼,輸入root的密碼就好

之后它會自己下載所依賴的package

step3:打開3306端口

因為mysql默認使用的是3306端口,而centOS默認是不打開此端口的,因此要先打開它,命令是

/sbin/iptables -I INPUT -p tcp --dport 3036 -j ACCEPT

保存設置

/etc/rc.d/init.d/iptables save

step4:找到安裝的程序,運行MySQL workbench

在application->programming下面就可以看得MySQL workbench了

新建一個connection

點擊store in Keychain保存密碼

然后一直OK直到創建這個connection就可以了。

可以看到我們新建了一個connection,雙擊打開這個connection。

可以看到,現在整個庫里還是空的,什么東西都沒有。

此時你可以新建database,或者選擇導入也可以。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM