CentOS8.2安装 Mysql5.7出现包冲突。file /etc/my.cnf from install of mysql-community-server conflicts with

环境:CentOS8.2
安装Mysql 5.7
安装包来源:http://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64

参考
博客园:三度
CSDN:不要再说了哇

依次安装mysql的common、lib、client的时候都没有问题。
安装server的时候出现一下问题

Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /etc/my.cnf from install of mysql-community-server-5.7.24-1.el7.x86_64 conflicts with file from package mariadb-connector-c-config-3.1.11-2.el8_3.noarch

查阅了网上资料,大多是修改文件 /etc/yum.repos.d/mysql-community.repo 目录下的文件,但是我这个问题还是没有解决。
我又看了一眼报错信息,提示说和后面这个包(mariadb-connector-c-config-3.1.11-2.el8_3.noarch)冲突了,我查了一下 yum list installed,确实安装了这个软件包,那就卸载了试试。输入命令yum remove [pakeageName],再重新安装server包。成功安装server软件包
查看软件状态:rpm -qi mysql-community-server

[root@VM-12-16-centos mysql5.7_el7]# rpm -qi mysql-community-server
Name        : mysql-community-server
Version     : 5.7.24
Release     : 1.el7
Architecture: x86_64
Install Date: Fri 21 Jan 2022 11:04:35 AM CST
Group       : Applications/Databases
Size        : 780055633
License     : Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Under GPLv2 license as shown in the Description field.
Signature   : DSA/SHA1, Fri 05 Oct 2018 01:35:02 PM CST, Key ID 8c718d3b5072e1f5
Source RPM  : mysql-community-5.7.24-1.el7.src.rpm
Build Date  : Thu 04 Oct 2018 02:22:15 PM CST
Build Host  : siv17.no.oracle.com
Relocations : (not relocatable)
Packager    : MySQL Release Engineering .oracle.com>
Vendor      : Oracle and/or its affiliates
URL         : http://www.mysql.com/
Summary     : A very fast and reliable SQL database server
Description :
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
Oracle and/or its affiliates

The MySQL software has Dual Licensing, which means you can use the MySQL
software free of charge under the GNU General Public License
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
licenses from Oracle and/or its affiliates if you do not wish to be bound by the terms of
the GPL. See the chapter "Licensing and Support" in the manual for
further info.

The MySQL web site (http://www.mysql.com/) provides the latest news and
information about the MySQL software.  Also please see the documentation
and the manual for more information.

This package includes the MySQL server binary as well as related utilities
to run and administer a MySQL server.

你可能感兴趣的:(linux,java,sql学习,mariadb,mysql,数据库)