centos安装mysql5.1_CentOS 6.9安装MySQL 5.1.73

本文档详细介绍了如何在CentOS 6.9环境下,从检查现有MySQL安装到卸载旧版本,再到安装MySQL 5.1.73的过程。通过yum命令进行操作,确保了相关依赖的正确处理。最后,成功启动并设置了MySQL服务,包括开机启动、端口开放和密码设定。
摘要由CSDN通过智能技术生成

分享在CentOS 6.9环境中安装MySQL 5.1.73 数据库,希望对大家有所帮助。

1、确认mysql是否已安装,有下面的代码可知

[root@cdh1 linuxidc]# yum list installed mysql*Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile*base: mirrors.zju.edu.cn*extras: mirrors.aliyun.com*updates: mirrors.aliyun.com

Installed Packages

MySQL-Python.x86_64 1.2.3-0.3.c1.1.el6 @base

mysql-libs.x86_64  5.1.73-8.el6_8    @anaconda-CentOS-201703281317.x86_64/6.9

2、卸载已安装的mysql,建议使用yum命令,因为yum命令可以自动删除与mysql相关的依赖;如果使用rpm命令,则还需要手动去删除和mysql相关的文件,比较麻烦

[root@cdh1 linuxidc]# yum remove MySQL-python.x86_64 mysql-libs.x86_64

Loaded plugins: fastestmirror, refresh-packagekit, security

Setting up Remove Process

Resolving Dependencies-->Running transaction check---> Package MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6 will be erased--> Processing Dependency: MySQL-python for package: cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_64---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be erased--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-8.el6.x86_64--> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-8.el6.x86_64-->Running transaction check---> Package cloudera-manager-agent.x86_64 0:5.11.1-1.cm5111.p0.9.el6 will be erased---> Package postfix.x86_64 2:2.6.6-8.el6 will be erased--> Processing Dependency: /usr/sbin/sendmail for package: RedHat-lsb-core-4.0-7.el6.centos.x86_64--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-16.el6_8.2.x86_64-->Running transaction check---> Package cronie.x86_64 0:1.4.4-16.el6_8.2will be erased--> Processing Dependency: cronie = 1.4.4-16.el6_8.2 for package: cronie-anacron-1.4.4-16.el6_8.2.x86_64---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be erased--> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-printing-4.0-7.el6.centos.x86_64--> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64--> Processing Dependency: redhat-lsb-core(x86-64) = 4.0 for package: redhat-lsb-graphics-4.0-7.el6.centos.x86_64-->Running transaction check---> Package cronie-anacron.x86_64 0:1.4.4-16.el6_8.2will be erased---> Package redhat-lsb.x86_64 0:4.0-7.el6.centos will be erased--> Processing Dependency: redhat-lsb(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-compat-4.0-7.el6.centos.x86_64---> Package redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos will be erased---> Package redhat-lsb-printing.x86_64 0:4.0-7.el6.centos will be erased-->Running transaction check---> Package redhat-lsb-compat.x86_64 0:4.0-7.el6.centos will be erased--> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-33.el6.x86_64-->Restarting Dependency Resolution with new changes.-->Running transaction check---> Package crontabs.noarch 0:1.10-33.el6 will be erased---> Package sysstat.x86_64 0:9.0.4-33.el6 will be erased-->Finished Dependency Resolution

Dependencies Resolved====================================================================Package                Arch  Version                  Repository

Size====================================================================Removing:

MySQL-python          x86_64 1.2.3-0.3.c1.1.el6      @base 246k

mysql-libs            x86_64 5.1.73-8.el6_8          @anaconda-CentOS-201703281317.x86_64/6.9

4.0M

Removingfordependencies:

cloudera-manager-agent x86_64 5.11.1-1.cm5111.p0.9.el6 @/cloudera-manager-agent-5.11.1-1.cm5111.p0.9.el6.x86_6471M

cronie                x86_641.4.4-16.el6_8.2        @anaconda-CentOS-201703281317.x86_64/6.9

174k

cronie-anacron        x86_64 1.4.4-16.el6_8.2        @anaconda-CentOS-201703281317.x86_64/6.9

43k

crontabs              noarch1.10-33.el6              @anaconda-CentOS-201703281317.x86_64/6.9

2.4k

postfix                x86_642:2.6.6-8.el6            @anaconda-CentOS-201703281317.x86_64/6.9

9.7M

redhat-lsb            x86_64 4.0-7.el6.centos        @anaconda-CentOS-201703281317.x

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值