安裝前準備工作:
下載server安裝包(rpm包)及用戶端安裝包:
我用的是官網上提供的最新版:
server:MySQL-server-5.1.53-1.glibc23.i386.rpm
client:MySQL-client-5.1.53-1.glibc23.i386.rpm
兩包都考到本地後,進入要安裝目錄:
我的是mysql這個目錄下:
xSwap@linux-p33n:~/mysql>
由於我目前使用者沒有許可權進行安裝操作,可以sudo提升許可權也可切換使用者,我賺麻煩直接換使用者了 su root your password OK
好,現在開始安裝server包:
linux-p33n:/home/xSwap/mysql # rpm -ivh MySQL-server-5.1.53-1.glibc23.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h linux-p33n password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
Starting MySQL. done
安裝完了,成功與否,看下連接埠就知道:
linux-p33n:/home/xSwap/mysql # netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 127.0.0.1:48125 TIME_WAIT
tcp 0 0 127.0.0.1:3306 127.0.0.1:48128 TIME_WAIT
tcp 0 0 127.0.0.1:3306 127.0.0.1:48123 TIME_WAIT
tcp 0 0 127.0.0.1:3306 127.0.0.1:48122 TIME_WAIT
tcp 0 0 127.0.0.1:3306 127.0.0.1:48127 TIME_WAIT
tcp 0 0 127.0.0.1:3306 127.0.0.1:48130 TIME_WAIT
tcp 0 0 127.0.0.1:3306 127.0.0.1:48124 TIME_WAIT
tcp 0 0 127.0.0.1:3306 127.0.0.1:48126 TIME_WAIT
tcp 0 0 :::11168 :::* LISTEN
tcp 0 0 :::9000 :::* LISTEN
tcp 0 0 :::111 :::* LISTEN
tcp 0 0 ::1:631 :::* LISTEN
tcp 0 0 ::1:25 :::* LISTEN
tcp 0 0 127.0.0.1:48131 127.0.0.1:3306 TIME_WAIT
tcp 1 0 192.9.11.210:9000 192.9.11.73:4910 CLOSE_WAIT
tcp 0 0 192.9.11.210:59158 192.9.11.180:55555 ESTABLISHED
tcp 0 0 127.0.0.1:48129 127.0.0.1:3306 TIME_WAIT
有看到3306這個字眼了,哈哈高興一小下,server包安裝成功了
接下來client包:
linux-p33n:/home/xSwap/mysql # rpm -ivh MySQL-client-5.1.53-1.glibc23.i386.rpm
Preparing... ########################################### [100%]
package MySQL-client-5.1.53-1.glibc23.i386 is already installed
package MySQL-client-5.1.53-1.glibc23.i386 is already installed
之前安這此包當然會此提示了,頭次裝的話不會出現些提示的
ok,安裝完成!當然了安裝成不成功我說了不算得測下看了:
linux-p33n:/home/xSwap/mysql # mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 220
Server version: 5.1.53 MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
ok,到此為此大功告成!