我无法在 centOS7 上安装 mysql

我无法在 centOS7 上安装 mysql

我尝试在 CentOS7 上安装 mysql 5.7。但是我做不到。首先我尝试了以下命令

[root@localhost myinstall]# rpm -qa | grep ^mysql-server
[root@localhost myinstall]# yum install mysql-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
No package mysql-server available.
Error: Nothing to do

其次,我尝试跟随,但也失败了。

[root@localhost iwantoinst]# yum -y install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Loaded plugins: fastestmirror, langpacks
mysql-community-release-el7-5.noarch.rpm                                          | 6.0 kB  00:00:00     
Examining /var/tmp/yum-root-8bl5FQ/mysql-community-release-el7-5.noarch.rpm: mysql-community-release-el7-5.noarch
Marking /var/tmp/yum-root-8bl5FQ/mysql-community-release-el7-5.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-release.noarch 0:el7-5 will be installed
--> Processing Conflict: mysql57-community-release-fc22-7.noarch conflicts mysql-community-release
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
No package matched to upgrade: mysql-community-release
--> Finished Dependency Resolution
Error: mysql57-community-release conflicts with mysql-community-release-el7-5.noarch
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@localhost iwantoinst]# yum -y install mysql-community-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
No package mysql-community-server available.
Error: Nothing to do

我该怎么做呢?拜托!

答案1

如果您可以使用 MariaDB 代替 MySQL(警告:在极端情况下兼容性可能低于 100%):

您可以直接从下载

https://downloads.mariadb.org/

但最好使用存储库配置工具

https://downloads.mariadb.org/mariadb/repositories/#mirror=mva

MariaDB 配置指南

因此创建文件

/etc/yum.repos.d/MariaDB.repo

并显示所指示的内容,然后

yum install MariaDB-server MariaDB-client

然后我们有这个:

$ rpm --query --all | grep -i maria

MariaDB-common-10.3.12-1.el7.centos.x86_64
MariaDB-compat-10.3.12-1.el7.centos.x86_64
MariaDB-client-10.3.12-1.el7.centos.x86_64
MariaDB-server-10.3.12-1.el7.centos.x86_64

运行测试

(我还没这么做,真丢脸)

阅读 INSTALL-BINARY

https://mariadb.com/kb/en/library/mysqltest/

https://mariadb.com/kb/en/library/mysql-test-overview/

跑步

/home/mysql/mariadb/mysql-test/mtr

彻底失败。

大多数测试都需要调试版本!

相关内容