安装MYSQL错误“conflicts with file from package mysql-libs-*” 解决方法

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介:

安装MYSQL的时候时:


错误现象:


[root@localhost opt]# rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm 
Preparing...                ########################################### [100%]
	file /usr/share/mysql/charsets/Index.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/armscii8.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/ascii.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp1250.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp1256.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp1257.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp850.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64
	file /usr/share/mysql/charsets/cp852.xml from install of MySQL-server-5.5.32-1.el6.x86_64 conflicts with file from package mysql-libs-5.1.61-4.el6.x86_64

错误原因:

原因由包冲突引起的!


解决方法:

先移除冲突的libs包,再进行安装。

yum -y remove mysql-libs-5.1.61*

-y的意思就是不用询问是否remove卸载完成之后,

然后再执行命令

rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.rpm
安装MySQL就可以成功了,如下:

[root@localhost opt]# rpm -ivh MySQL-server-5.5.32-1.el6.x86_64.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 localhost.localdomain 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!

[root@localhost opt]# 




相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
1天前
|
关系型数据库 MySQL Linux
本地虚拟机centos7通过docker安装主从mysql5.7.21
本地虚拟机centos7通过docker安装主从mysql5.7.21
|
3天前
|
关系型数据库 MySQL 数据库
龙蜥操作系统上安装MySQL:步骤详解与常见问题解决
龙蜥操作系统上安装MySQL:步骤详解与常见问题解决
|
3天前
|
关系型数据库 MySQL Linux
在Centos7中:通过Docker安装MySQL5.7(保姆级)
在Centos7中:通过Docker安装MySQL5.7(保姆级)
|
3天前
|
编解码 安全 关系型数据库
祝福CSDN的小伙伴2024年快乐!Windows7安装MySQL
祝福CSDN的小伙伴2024年快乐!Windows7安装MySQL
|
3天前
|
存储 关系型数据库 MySQL
Mysql大数据批量插入方法
Mysql大数据批量插入方法
19 0
|
5天前
|
关系型数据库 MySQL Linux
Linux CentOs7 安装Mysql(5.7和8.0版本)密码修改 超详细教程
Linux CentOs7 安装Mysql(5.7和8.0版本)密码修改 超详细教程
|
5天前
|
安全 关系型数据库 MySQL
MySQL安装教程
MySQL安装教程
29 0
|
5天前
|
SQL 关系型数据库 MySQL
【简单无脑】自动化脚本一键安装虚拟机下的MySQL服务
该文章提供了在虚拟机上安装MySQL服务的简化方法,特别是针对新手。作者提供了一个自动化脚本`install_mysql.sh`,使得安装过程更简单。用户需要下载`install.rpm`资源,将其放在指定目录下,然后创建并编辑脚本文件,将提供的代码粘贴进去,通过`chmod u+x`授权,最后运行脚本`./install_mysql.sh [rpm文件路径]`来安装MySQL。文章还附有相关图片说明。
16 1
【简单无脑】自动化脚本一键安装虚拟机下的MySQL服务
|
1天前
|
关系型数据库 MySQL 数据库
docker MySQL删除数据库时的错误(errno: 39)
docker MySQL删除数据库时的错误(errno: 39)
|
1天前
|
关系型数据库 MySQL 数据库连接
用Navicat备份Mysql演示系统数据库的时候出:Too Many Connections
用Navicat备份Mysql演示系统数据库的时候出:Too Many Connections