如何卸载 MariaDB 并重新安装 MySQL?MySQL 安装变成 MariaDB 安装

如何卸载 MariaDB 并重新安装 MySQL?MySQL 安装变成 MariaDB 安装

我最近通过桌面升级了我的 CentOS 系统。错误!

之前我的 MariaDB 和 phpMyAdmin 运行正常 - 但升级后它们就停止了。

我疯狂地谷歌搜索,试图找到一些教程关于 MariaDB MySQL 重新安装,直到我看到这个:

我执行了这个命令来删除所有 MySQL:

yum remove mysql-server mysql-libs mysql-devel mysql*

然后尝试重新安装 MySQL:

如下所示 - 它崩溃并出现以下错误:

*****************************************************************
[root@localhost ~]# yum install mysql-server mysql mysql-devel
*****************************************************************

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.serverspace.co.uk
 * extras: centos.serverspace.co.uk
 * rpmforge: www.mirrorservice.org
 * updates: mirror.rmg.io
Setting up Install Process
Package mysql-server is obsoleted by MariaDB-server, trying to install MariaDB-server-5.5.29-1.i686 instead
Package mysql is obsoleted by MariaDB-server, trying to install MariaDB-server-5.5.29-1.i686 instead
Package mysql-devel is obsoleted by MariaDB-devel, trying to install MariaDB-devel-5.5.29-1.i686 instead
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-devel.i686 0:5.5.29-1 set to be updated
--> Processing Dependency: MariaDB-common for package: MariaDB-devel
---> Package MariaDB-server.i686 0:5.5.29-1 set to be updated
--> Processing Dependency: libssl.so.10 for package: MariaDB-server
--> Processing Dependency: libcrypto.so.10 for package: MariaDB-server
--> Running transaction check
---> Package MariaDB-common.i686 0:5.5.29-1 set to be updated
--> Processing Dependency: MariaDB-compat for package: MariaDB-common
---> Package MariaDB-server.i686 0:5.5.29-1 set to be updated
--> Processing Dependency: libssl.so.10 for package: MariaDB-server
--> Processing Dependency: libcrypto.so.10 for package: MariaDB-server
--> Running transaction check
---> Package MariaDB-compat.i686 0:5.5.29-1 set to be updated
---> Package MariaDB-server.i686 0:5.5.29-1 set to be updated
--> Processing Dependency: libssl.so.10 for package: MariaDB-server
--> Processing Dependency: libcrypto.so.10 for package: MariaDB-server
--> Finished Dependency Resolution
MariaDB-server-5.5.29-1.i686 from mariadb has depsolving problems
  --> Missing Dependency: libcrypto.so.10 is needed by package MariaDB-server-5.5.29-1.i686 (mariadb)
MariaDB-server-5.5.29-1.i686 from mariadb has depsolving problems
  --> Missing Dependency: libssl.so.10 is needed by package MariaDB-server-5.5.29-1.i686 (mariadb)
Error: Missing Dependency: libcrypto.so.10 is needed by package MariaDB-server-5.5.29-1.i686 (mariadb)
Error: Missing Dependency: libssl.so.10 is needed by package MariaDB-server-5.5.29-1.i686 (mariadb)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest

[root@localhost ~]

如果我现在尝试安装 libssl.10,系统会要求我安装 glibc 库。2.17 和 2.7。
其他讨论说要避开它们,因为这会使我的系统崩溃。我尝试下载 2.17,但它非常大 - 解压需要很长时间。

有人可以帮我完全删除 MariaDB 并安装 MySQL - 这样当我运行时就不会出现上述错误并推送到 MariaDB:

yum install mysql-server mysql mysql-devel

关于如何安装 MariaDB 的资料有很多 - 但到目前为止我发现没有一个能清楚地解释如何返回到 MySQL。

答案1

您的系统上仍然有 MariaDB yum 存储库。只要您这样做,MariaDB 将继续取代 MySQL。

要解决此问题,请删除 MariaDB 存储库。通过在目录中找到文件(可能命名为mariadb.repo)来执行此操作/etc/yum.repos.d。找到文件后,您可以将其删除,也可以编辑文件并更改enabled=1enabled=0

答案2

如果您必须有 mysql,您需要添加 mysql-community repo sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm,然后您可以像平常一样安装 MySQLl。

答案3

在 Ubuntu 上你需要删除dbconfig-mysql并安装dbconfig-no-thanks

相关内容