当前位置:   article > 正文

[MySQL] CentOS7安装percona-xtrabackup时/etc/my.cnf冲突报错解决_percona安装时没有生成 /etc/my.cnf 文件.

percona安装时没有生成 /etc/my.cnf 文件.

环境:
CentOS7.3 + mysql-community-5.7

  1. [root@mysql-02 ~]# cat /etc/redhat-release
  2. CentOS Linux release 7.3.1611 (Core)
  3. [root@mysql-lh02 ~]# rpm -qa | grep -i mysql
  4. perl-DBD-MySQL-4.023-5.el7.x86_64
  5. mysql-community-client-5.7.19-1.el7.x86_64
  6. mysql-community-libs-compat-5.7.19-1.el7.x86_64
  7. mysql-community-common-5.7.19-1.el7.x86_64
  8. mysql-community-server-5.7.19-1.el7.x86_64
  9. [root@mysql-02 ~]#


安装percona-xtrabackup时冲突报错

  1. [root@mysql-02 ~]# yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
  2. [root@mysql-lh02 ~]# yum list | grep percona-xtrabackup
  3. percona-xtrabackup.x86_64                   2.3.9-1.el7                percona-release-x86_64
  4. percona-xtrabackup-22.x86_64                2.2.13-1.el7               percona-release-x86_64
  5. percona-xtrabackup-22-debuginfo.x86_64      2.2.13-1.el7               percona-release-x86_64
  6. percona-xtrabackup-24.x86_64                2.4.8-1.el7                percona-release-x86_64
  7. percona-xtrabackup-24-debuginfo.x86_64      2.4.8-1.el7                percona-release-x86_64
  8. percona-xtrabackup-debuginfo.x86_64         2.3.9-1.el7                percona-release-x86_64
  9. percona-xtrabackup-test.x86_64              2.3.9-1.el7                percona-release-x86_64
  10. percona-xtrabackup-test-22.x86_64           2.2.13-1.el7               percona-release-x86_64
  11. percona-xtrabackup-test-24.x86_64           2.4.8-1.el7                percona-release-x86_64
  12. [root@mysql-02 ~]# yum install percona-xtrabackup-24
  13. Loaded plugins: fastestmirror, langpacks
  14. Loading mirror speeds from cached hostfile
  15. Resolving Dependencies
  16. --> Running transaction check
  17. ---> Package percona-xtrabackup-24.x86_64 0:2.4.8-1.el7 will be installed
  18. --> Processing Dependency: perl(DBD::mysql) for package: percona-xtrabackup-24-2.4.8-1.el7.x86_64
  19. --> Processing Dependency: libev.so.4()(64bit) for package: percona-xtrabackup-24-2.4.8-1.el7.x86_64
  20. --> Running transaction check
  21. ---> Package libev.x86_64 0:4.15-7.el7 will be installed
  22. ---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be installed
  23. --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: perl-DBD-MySQL-4.023-5.el7.x86_64
  24. --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: perl-DBD-MySQL-4.023-5.el7.x86_64
  25. --> Running transaction check
  26. ---> Package Percona-Server-shared-56.x86_64 0:5.6.37-rel82.2.el7 will be installed
  27. --> Finished Dependency Resolution
  28. Dependencies Resolved
  29. =============================================================================================
  30.  Package                     Arch      Version               Repository                 Size
  31. =============================================================================================
  32. Installing:
  33.  percona-xtrabackup-24       x86_64    2.4.8-1.el7           percona-release-x86_64    7.4 M
  34. Installing for dependencies:
  35.  Percona-Server-shared-56    x86_64    5.6.37-rel82.2.el7    percona-release-x86_64    618 k
  36.  libev                       x86_64    4.15-7.el7            extras                     44 k
  37.  perl-DBD-MySQL              x86_64    4.023-5.el7           base                      140 k
  38. Transaction Summary
  39. =============================================================================================
  40. Install  1 Package (+3 Dependent packages)
  41. Total download size: 8.1 M
  42. Installed size: 35 M
  43. Is this ok [y/d/N]: y
  44. Downloading packages:
  45. (1/4): libev-4.15-7.el7.x86_64.rpm                                    |  44 kB  00:00:02    
  46. (2/4): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm                          | 140 kB  00:00:02    
  47. warning: /var/cache/yum/x86_64/7/percona-release-x86_64/packages/Percona-Server-shared-56-5.6.37-rel82.2.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
  48. Public key for Percona-Server-shared-56-5.6.37-rel82.2.el7.x86_64.rpm is not installed
  49. (3/4): Percona-Server-shared-56-5.6.37-rel82.2.el7.x86_64.rpm         | 618 kB  00:00:05    
  50. (4/4): percona-xtrabackup-24-2.4.8-1.el7.x86_64.rpm                   | 7.4 MB  00:00:33    
  51. ---------------------------------------------------------------------------------------------
  52. Total                                                        250 kB/s | 8.1 MB  00:00:33    
  53. Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
  54. Importing GPG key 0xCD2EFD2A:
  55.  Userid     : "Percona MySQL Development Team <mysql-dev@percona.com>"
  56.  Fingerprint: 430b df5c 56e7 c94e 848e e60c 1c4c bdcd cd2e fd2a
  57.  Package    : percona-release-0.1-4.noarch (installed)
  58.  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
  59. Is this ok [y/N]: y
  60. Running transaction check
  61. Running transaction test
  62. Transaction check error:
  63.   file /etc/my.cnf from install of Percona-Server-shared-56-5.6.37-rel82.2.el7.x86_64 conflicts with file from package mysql-community-server-5.7.19-1.el7.x86_64
  64. Error Summary
  65. -------------
  66. [root@mysql-02 ~]#


解决办法:

补充安装

  1. [root@mysql-02 ~]# rpm -ivh mysql-community-libs-compat-5.7.19-1.el7.x86_64.rpm
  2. Preparing...                          ################################# [100%]
  3. Updating / installing...
  4.    1:mysql-community-libs-compat-5.7.1################################# [100%]
  5. [root@mysql-02 ~]#

然后再次安装percona-xtrabackup成功

  1. [root@mysql-02 ~]# yum install percona-xtrabackup-24
  2. Loaded plugins: fastestmirror, langpacks
  3. Loading mirror speeds from cached hostfile
  4. Resolving Dependencies
  5. --> Running transaction check
  6. ---> Package percona-xtrabackup-24.x86_64 0:2.4.8-1.el7 will be installed
  7. --> Processing Dependency: perl(DBD::mysql) for package: percona-xtrabackup-24-2.4.8-1.el7.x86
  8. --> Processing Dependency: libev.so.4()(64bit) for package: percona-xtrabackup-24-2.4.8-1.el7._64
  9. --> Running transaction check
  10. ---> Package libev.x86_64 0:4.15-7.el7 will be installed
  11. ---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be installed
  12. --> Finished Dependency Resolution
  13. Dependencies Resolved
  14. ==============================================================================================
  15.  Package                     Arch         Version             Repository                    Si
  16. ==============================================================================================
  17. Installing:
  18.  percona-xtrabackup-24       x86_64       2.4.8-1.el7         percona-release-x86_64       7.4
  19. Installing for dependencies:
  20.  libev                       x86_64       4.15-7.el7          extras                        44
  21.  perl-DBD-MySQL              x86_64       4.023-5.el7         base                         140
  22. Transaction Summary
  23. ==============================================================================================
  24. Install  1 Package (+2 Dependent packages)
  25. Total size: 7.5 M
  26. Installed size: 31 M
  27. Is this ok [y/d/N]: y
  28. Downloading packages:
  29. Running transaction check
  30. Running transaction test
  31. Transaction test succeeded
  32. Running transaction
  33. Warning: RPMDB altered outside of yum.
  34. ** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
  35. ipa-client-4.4.0-12.el7.centos.x86_64 has installed conflicts freeipa-client: ipa-client-4.4.0.el7.centos.x86_64
  36. ipa-client-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-client-common: iplient-common-4.4.0-12.el7.centos.noarch
  37. ipa-common-4.4.0-12.el7.centos.noarch has installed conflicts freeipa-common: ipa-common-4.4.0.el7.centos.noarch
  38.   Installing : libev-4.15-7.el7.x86_64                                                       1
  39.   Installing : perl-DBD-MySQL-4.023-5.el7.x86_64                                             2
  40.   Installing : percona-xtrabackup-24-2.4.8-1.el7.x86_64                                      3
  41.   Verifying  : perl-DBD-MySQL-4.023-5.el7.x86_64                                             1
  42.   Verifying  : percona-xtrabackup-24-2.4.8-1.el7.x86_64                                      2
  43.   Verifying  : libev-4.15-7.el7.x86_64                                                       3
  44. Installed:
  45.   percona-xtrabackup-24.x86_64 0:2.4.8-1.el7                                                 
  46. Dependency Installed:
  47.   libev.x86_64 0:4.15-7.el7                  perl-DBD-MySQL.x86_64 0:4.023-5.el7             
  48. Complete!
  49. [root@mysql-02 ~]#

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/88556
推荐阅读
相关标签
  

闽ICP备14008679号