我在 Centos 7 上通过命令安装 mysql
yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
在那之后:
yum install mysql-community-server
这是进程运行后的错误:
Downloading packages:
(1/7): libaio-0.3.109-13.el7.x86_64.rpm | 24 kB 00:00:00
warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-common-8.0.13-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Public key for mysql-community-common-8.0.13-1.el7.x86_64.rpm is not installed
(2/7): mysql-community-common-8.0.13-1.el7.x86_64.rpm | 554 kB 00:00:00
(3/7): mysql-community-libs-8.0.13-1.el7.x86_64.rpm | 2.3 MB 00:00:00
(4/7): mysql-community-client-8.0.13-1.el7.x86_64.rpm | 26 MB 00:00:01
(5/7): numactl-libs-2.0.9-7.el7.x86_64.rpm | 29 kB 00:00:00
(6/7): Percona-Server-shared-56-5.6.36-rel82.1.el7.x86_64.rpm | 619 kB 00:00:02
(7/7): mysql-community-server-8.0.13-1.el7.x86_64.rpm | 381 MB 00:00:11
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 34 MB/s | 410 MB 00:00:11
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Importing GPG key 0x5072E1F5:
Userid : "MySQL Release Engineering <[email protected]>"
Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
Package : mysql80-community-release-el7-1.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction check error:
file /etc/my.cnf conflicts between attempted installs of Percona-Server-shared-56-5.6.36-rel82.1.el7.x86_64 and mysql-community-server-8.0.13-1.el7.x86_64
Error Summary
-------------
请帮我解决这个问题,我搜索了很多页面但仍然没有找到解决方案
已解决:我尝试yum remove Percona*;
重新安装 mysql,成功了。但不确定接下来会不会有什么问题。谢谢大家。
答案1
这可能是因为您的系统上安装了 percona 服务器。
yum list installed | grep -i percona
您可以将 repoquery 与“--file”标志一起使用,以便查看该文件属于哪个包:
repoquery --file /usr/bin/mysql
尝试卸载 percona 服务器,然后尝试重新安装 mysql。