【问题标题】:Fails installing MySql on CentOS 7在 CentOS 7 上安装 MySql 失败
【发布时间】:2015-08-22 04:43:28
【问题描述】:

为什么和mariadb有关系?我全新安装了 CentOS 7,并想安装 MySql 社区版本。好像说要先安装Mariadb server?

# yum install mysql-community-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: linux.mirrors.es.net
 * extras: linux.mirrors.es.net
 * updates: linux.mirrors.es.net
Resolving Dependencies
--> Running transaction check
---> Package mariadb-server.x86_64 1:5.5.35-3.el7 will be obsoleted
--> Processing Dependency: mariadb-server for package: akonadi-mysql-1.9.2-4.el7.x86_64
---> Package mysql-community-server.x86_64 0:5.6.25-2.el7 will be obsoleting
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.25-2.el7 for package: mysql-community-server-5.6.25-2.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) = 5.6.25-2.el7 for package: mysql-community-server-5.6.25-2.el7.x86_64
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.35-3.el7 will be obsoleted
---> Package mariadb-server.x86_64 1:5.5.35-3.el7 will be updated
---> Package mariadb-server.x86_64 1:5.5.41-2.el7_0 will be an update
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.41-2.el7_0 for package: 1:mariadb-server-5.5.41-2.el7_0.x86_64
--> Processing Dependency: mariadb(x86-64) = 1:5.5.41-2.el7_0 for package: 1:mariadb-server-5.5.41-2.el7_0.x86_64
---> Package mysql-community-client.x86_64 0:5.6.25-2.el7 will be obsoleting
---> Package mysql-community-common.x86_64 0:5.6.25-2.el7 will be installed
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.35-3.el7 will be updated
---> Package mariadb.x86_64 1:5.5.41-2.el7_0 will be an update
---> Package mariadb-libs.x86_64 1:5.5.35-3.el7 will be obsoleted
---> Package mariadb-libs.x86_64 1:5.5.35-3.el7 will be updated
---> Package mariadb-libs.x86_64 1:5.5.41-2.el7_0 will be an update
---> Package mysql-community-libs.x86_64 0:5.6.25-2.el7 will be obsoleting
Removing mariadb-server.x86_64 1:5.5.41-2.el7_0 - u due to obsoletes from mysql-community-server.x86_64 0:5.6.25-2.el7 - u
Removing mariadb.x86_64 1:5.5.41-2.el7_0 - u due to obsoletes from mysql-community-client.x86_64 0:5.6.25-2.el7 - u
Removing mariadb-libs.x86_64 1:5.5.41-2.el7_0 - u due to obsoletes from mysql-community-libs.x86_64 0:5.6.25-2.el7 - u
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.41-2.el7_0 will be an update
---> Package mariadb-libs.x86_64 1:5.5.41-2.el7_0 will be an update
---> Package mariadb-server.x86_64 1:5.5.41-2.el7_0 will be an update
--> Processing Dependency: mariadb-server for package: akonadi-mysql-1.9.2-4.el7.x86_64
--> Finished Dependency Resolution
Error: Package: akonadi-mysql-1.9.2-4.el7.x86_64 (@anaconda)
           Requires: mariadb-server
           Removing: 1:mariadb-server-5.5.35-3.el7.x86_64 (@anaconda)
               mariadb-server = 1:5.5.35-3.el7
           Obsoleted By: mysql-community-server-5.6.25-2.el7.x86_64 (mysql56-community)
               Not found
           Updated By: 1:mariadb-server-5.5.41-2.el7_0.x86_64 (base)
               mariadb-server = 1:5.5.41-2.el7_0

【问题讨论】:

  • MariaDB 是 MySQL 的兼容实现,并且已经安装在您的服务器上。但是安装 MySQL 社区发行版会取代它,据我所知,两者不能同时安装。似乎 akonadi 具有 MySQL 社区不满足的 mariadb 依赖项。你需要akonadi吗? (KDE 桌面的一部分)
  • 当前安装的 MariaDB 是否不能满足您的需求?通常由 MySQL 处理的所有事情都将由 mariadb 完成,包括二进制文件 /usr/bin/mysql/usr/sbin/mysqld
  • 我在openshift有一个应用,数据库有MySql。我不确定是否需要 akonadi,但我使用的是 KDE 桌面。如果我卸载 MariaDB,它是否允许我安装 MySql?
  • 另外,当我执行“mariadb”时,“找不到命令”。
  • 它调用的可执行文件不是mariadb,它只是mysql,因为它是一个完全兼容的替代品。在不更改原始 MariaDB 设置的情况下,在命令行上运行 mysql(您可能首先需要通过 sudo systemctl start mysqld.service 启动服务器)。客户端应该启动并且提示将类似于MariaDB [(none)]>。以与 MySQL 相同的方式与它完全交互,使用它的应用程序不会看到差异。

标签: mysql centos7


【解决方案1】:

在 CentOS 7 中 - Maria DB 已安装。因此,您面临着这个问题。{MariaDB 是 MySQL 的兼容实现}。 如果你想安装 Mysql - 首先你应该删除当前现有的 Mari DB。

第 1 步:完全删除 Maria DB 即 yum -y 删除 mariadb-libs

第 2 步:安装 MySQL

     i. wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
     ii. yum localinstall mysql57-community-release-el7-7.noarch.rpm
     iii. yum repolist enabled | grep "mysql.*-community.*"
     iv. yum install mysql-community-server
     v. yum-config-manager --disable mysql57-community
     vi. yum-config-manager --enable mysql56-community
     viii. service mysqld start
     ix. service mysqld status
     x. mysql --version
     xi. mysql -u root -p

问候,

曼朱纳特·奈克

【讨论】:

  • 这杀死了我的 plesk 安装。我死了x_x
【解决方案2】:

您应该先删除 Maiadb。

# yum -y remove mariadb-libs

【讨论】:

  • 详细说明你的答案用户代码有什么问题它如何解决 Op 的问题而不仅仅是一条线,编辑你的答案
猜你喜欢
  • 2016-07-26
  • 1970-01-01
  • 2017-11-03
  • 2020-08-15
  • 2015-09-13
  • 1970-01-01
  • 1970-01-01
  • 2016-11-15
  • 1970-01-01
相关资源
最近更新 更多