在SUSE下安装MySQL全过程

在SUSE下安装MySQL全过程

[日期:2010-11-30]来源:Linux社区  作者:Linux[字体:大 中 小]

安装前准备工作:

下载server安装包(rpm包)及客户端安装包:

我用的是官网上提供的最新版:

1. wget  ftp://ftp.pbone.net/mirror/dev.mysql.com/pub/Downloads/MySQL-5.1/MySQL-server-5.1.73-1.glibc23.i386.rpm

2. wget http://ftp.kaist.ac.kr/mysql/Downloads/MySQL-5.1/MySQL-client-5.1.72-1.glibc23.x86_64.rpm

两包都考到本地后,进入要安装目录:

我的是mysql这个目录下:

xSwap@linux-p33n:~/mysql>

由于我当前用户没有权限进行安装操作,可以sudo提升权限也可切换用户,我赚麻烦直接换用户了 su root  your password OK

好,现在开始安装server包:

linux-p33n:/home/xSwap/mysql # rpm -ivh MySQL-5.1/MySQL-server-5.1.73-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

如果安装出错报 failed dependencies:libgcc_s.so.1 is needed by MySQL....请看这里

安装完了,成功与否,看下端口就知道:

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.72-1.glibc23.x86_64.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,到此为此大功告成!

linux下一篇 允许外网IP访问mysql

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值