在已安装 Mysql 的 Centos6.9 上安装 MariaDB 时发生冲突

Conflict while Installing MariaDB on Centos6.9 that has Mysql already installed

我有 VPS Centos 6.9 服务器和 Cpanel,此服务器已安装 mysql56。我想用 MariaDB 替换 mysql 以便安装 bench erpnext。 我遵循了这个 tutorial,并且我通过以下方式删除了 mysql:

yum remove mysql-server
yum remove mysql-libs 

但是,当我按照教程中的说明尝试安装 MariaDB 时:

yum install MariaDB-server MariaDB-client -y

已抛出此错误:

  Transaction Check Error:
  file /usr/bin/mysql from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/msql2mysql from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysql_find_rows from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysql_waitpid from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysqlaccess from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysqladmin from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysqlbinlog from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysqlcheck from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysqldump from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysqlimport from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysqlshow from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/bin/mysqlslap from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/msql2mysql.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysql.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysql_find_rows.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysql_waitpid.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysqlaccess.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysqladmin.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysqlbinlog.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysqlcheck.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysqldump.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysqlimport.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysqlshow.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64
  file /usr/share/man/man1/mysqlslap.1.gz from install of MariaDB-client-5.5.56-1.el6.x86_64 conflicts with file from package MySQL56-client-5.6.35-1.cp1156.x86_64

错误摘要

我看到了类似的 Stack Over Flow question,但没有对我的情况有用的答案。

已解决 删除 mysql-client 解决了这个问题。

yum remove mysql-client

在安装 Maria 之前,您需要删除 MySQL56-client 和任何其他 MySQL56 软件包。