安装前准备工作:

下载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,到此为此大功告成!0b1331709591d260c1c78e86d0c51c18.png

Logo

更多推荐