Linux alamalinux10.2安装mysql-9.7.1趣闻
背景:
最小化安装了alamalinux10.2之后,实际使用中需要安装mysql,于是安装了mysql的yum源:
rpm -ivh https://dev.mysql.com/get/mysql84-community-release-el10-3.noarch.rpm
本来想着执行 yum install -y mysql-community-server 能轻松搞定。然而,却报错了。提示与mariadb11.8-server-3和mariadb11.8-3冲突,可是当前主机上根本就没有这两个包。
最后排查发现居然是yum自己分析需要安装mariadb,然后mariadb又与mysql-community-server冲突,所以,陷入死循环,自己把自己玩死了。
解决方法:
1、下载mysql-community-server离线安装包
2、解决perl等依赖
3、本地化安装mysql-community-server
关键信息截图:
yum安装mysql-community-server报错关键信息截图。可以明显看出要安装mysql-community-server需先安装mariadb11.8-server和mariadb11.8等,后续又提示软件包冲突。



官网下载离线安装包,并解压缩:
wget https://dev.mysql.com/get/Downloads/MySQL-9.7/mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar


安装perl

安装openssl

按照openssl-devel

安装perl-JSON

安装mysql-9.7.1并启动mysqld

测试并验证mysqld安装成功


具体记录如下:
[root@alamalinux102 ~]<QQ>yum clean all
130 files removed
[root@alamalinux102 ~]<QQ>cd
[root@alamalinux102 ~]<QQ>rpm -qa|grep mysql
[root@alamalinux102 ~]<QQ>rpm -qa|grep -i maria
[root@alamalinux102 ~]<QQ>find / -name mariadb*
[root@alamalinux102 ~]<QQ>yum install -y mysql-community-server-9.7.1 mysql-community-client-9.7.1
AlmaLinux 10 - AppStream 951 kB/s | 2.1 MB 00:02
AlmaLinux 10 - BaseOS 3.8 MB/s | 8.9 MB 00:02
AlmaLinux 10 - CRB 141 kB/s | 499 kB 00:03
AlmaLinux 10 - Extras 4.1 kB/s | 7.3 kB 00:01
Docker CE Stable - x86_64 35 kB/s | 23 kB 00:00
Kubernetes 18 kB/s | 7.0 kB 00:00
MySQL Connectors Community 1.5 kB/s | 9.9 kB 00:06
MySQL 9.7 LTS Community Server 4.5 kB/s | 6.2 kB 00:01
MySQL Tools 9.7 LTS Community 1.9 kB/s | 2.7 kB 00:01
Dependencies resolved.
=================================================================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================================================================
Installing:
mysql-community-client x86_64 9.7.1-1.el10 mysql-9.7-lts-community 3.4 M
mysql-community-server x86_64 9.7.1-1.el10 mysql-9.7-lts-community 56 M
Installing dependencies:
checkpolicy x86_64 3.10-1.el10 appstream 368 k
mariadb-connector-c x86_64 3.4.4-1.el10 baseos 206 k
mariadb11.8 x86_64 3:11.8.6-2.el10_2.alma.1 appstream 1.9 M
mariadb11.8-common noarch 3:11.8.6-2.el10_2.alma.1 appstream 50 k
mariadb11.8-errmsg noarch 3:11.8.6-2.el10_2.alma.1 appstream 214 k
mysql-community-client-plugins x86_64 9.7.1-1.el10 mysql-9.7-lts-community 1.5 M
mysql-community-common x86_64 9.7.1-1.el10 mysql-9.7-lts-community 641 k
mysql-community-icu-data-files x86_64 9.7.1-1.el10 mysql-9.7-lts-community 2.3 M
mysql-community-libs x86_64 9.7.1-1.el10 mysql-9.7-lts-community 1.5 M
mysql-selinux noarch 1.0.14-1.el10_0 appstream 37 k
perl-AutoLoader noarch 5.74-512.2.el10_0 appstream 21 k
perl-B x86_64 1.89-512.2.el10_0 appstream 176 k
perl-Carp noarch 1.54-511.el10 appstream 29 k
perl-Class-Struct noarch 0.68-512.2.el10_0 appstream 22 k
perl-DBD-MariaDB x86_64 1.23-10.el10 appstream 153 k
perl-DBI x86_64 1.643-26.el10 appstream 713 k
perl-Data-Dumper x86_64 2.189-512.el10 appstream 56 k
perl-Digest noarch 1.20-511.el10 appstream 25 k
perl-Digest-MD5 x86_64 2.59-6.el10 appstream 36 k
perl-DynaLoader x86_64 1.56-512.2.el10_0 appstream 26 k
perl-Encode x86_64 4:3.21-511.el10 appstream 1.1 M
perl-Errno x86_64 1.38-512.2.el10_0 appstream 15 k
perl-Exporter noarch 5.78-511.el10 appstream 31 k
perl-Fcntl x86_64 1.18-512.2.el10_0 appstream 29 k
perl-File-Basename noarch 2.86-512.2.el10_0 appstream 17 k
perl-File-Copy noarch 2.41-512.2.el10_0 appstream 20 k
perl-File-Path noarch 2.18-512.el10 appstream 35 k
perl-File-Temp noarch 1:0.231.100-512.el10 appstream 59 k
perl-File-stat noarch 1.14-512.2.el10_0 appstream 17 k
perl-FileHandle noarch 2.05-512.2.el10_0 appstream 15 k
perl-Getopt-Long noarch 1:2.58-3.el10 appstream 67 k
perl-Getopt-Std noarch 1.14-512.2.el10_0 appstream 15 k
perl-HTTP-Tiny noarch 0.088-512.el10 appstream 56 k
perl-IO x86_64 1.55-512.2.el10_0 appstream 77 k
perl-IO-Socket-IP noarch 0.42-512.el10 appstream 42 k
perl-IO-Socket-SSL noarch 2.085-3.el10 appstream 229 k
perl-IPC-Open3 noarch 1.22-512.2.el10_0 appstream 21 k
perl-MIME-Base64 x86_64 3.16-511.el10 appstream 30 k
perl-Math-BigInt noarch 1:2.0030.03-3.el10 appstream 231 k
perl-Math-Complex noarch 1.62-512.2.el10_0 appstream 46 k
perl-Mozilla-CA noarch 20231213-5.el10 appstream 14 k
perl-Net-SSLeay x86_64 1.94-8.el10 appstream 356 k
perl-POSIX x86_64 2.20-512.2.el10_0 appstream 96 k
perl-PathTools x86_64 3.91-512.el10 appstream 88 k
perl-Pod-Escapes noarch 1:1.07-511.el10 appstream 20 k
perl-Pod-Perldoc noarch 3.28.01-512.el10 appstream 88 k
perl-Pod-Simple noarch 1:3.45-511.el10 appstream 222 k
perl-Pod-Usage noarch 4:2.03-511.el10 appstream 40 k
perl-Scalar-List-Utils x86_64 5:1.63-511.el10 appstream 72 k
perl-SelectSaver noarch 1.02-512.2.el10_0 appstream 11 k
perl-Socket x86_64 4:2.038-511.el10 appstream 54 k
perl-Storable x86_64 1:3.32-511.el10 appstream 98 k
perl-Symbol noarch 1.09-512.2.el10_0 appstream 14 k
perl-Sys-Hostname x86_64 1.25-512.2.el10_0 appstream 17 k
perl-Term-ANSIColor noarch 5.01-512.el10 appstream 48 k
perl-Term-Cap noarch 1.18-511.el10 appstream 22 k
perl-Text-ParseWords noarch 3.31-511.el10 appstream 16 k
perl-Text-Tabs+Wrap noarch 2024.001-511.el10 appstream 22 k
perl-Time-Local noarch 2:1.350-511.el10 appstream 34 k
perl-URI noarch 5.27-3.el10 appstream 137 k
perl-base noarch 2.27-512.2.el10_0 appstream 16 k
perl-constant noarch 1.33-512.el10 appstream 23 k
perl-if noarch 0.61.000-512.2.el10_0 appstream 14 k
perl-interpreter x86_64 4:5.40.2-512.2.el10_0 appstream 72 k
perl-libnet noarch 3.15-512.el10 appstream 130 k
perl-libs x86_64 4:5.40.2-512.2.el10_0 appstream 2.2 M
perl-locale noarch 1.12-512.2.el10_0 appstream 13 k
perl-mro x86_64 1.29-512.2.el10_0 appstream 30 k
perl-overload noarch 1.37-512.2.el10_0 appstream 45 k
perl-overloading noarch 0.02-512.2.el10_0 appstream 13 k
perl-parent noarch 1:0.241-512.el10 appstream 15 k
perl-podlators noarch 1:5.01-511.el10 appstream 127 k
perl-vars noarch 1.05-512.2.el10_0 appstream 13 k
policycoreutils-python-utils noarch 3.10-1.el10 appstream 45 k
python3-audit x86_64 4.0.3-5.el10 appstream 68 k
python3-distro noarch 1.9.0-5.el10 appstream 51 k
python3-libsemanage x86_64 3.10-1.el10 appstream 80 k
python3-policycoreutils noarch 3.10-1.el10 appstream 2.1 M
python3-setools x86_64 4.6.0-3.el10 baseos 724 k
Installing weak dependencies:
mariadb11.8-backup x86_64 3:11.8.6-2.el10_2.alma.1 appstream 6.7 M
mariadb11.8-client-utils noarch 3:11.8.6-2.el10_2.alma.1 appstream 66 k
mariadb11.8-gssapi-server x86_64 3:11.8.6-2.el10_2.alma.1 appstream 16 k
mariadb11.8-server x86_64 3:11.8.6-2.el10_2.alma.1 appstream 10 M
mariadb11.8-server-utils noarch 3:11.8.6-2.el10_2.alma.1 appstream 25 k
perl-NDBM_File x86_64 1.17-512.2.el10_0 appstream 22 k
Transaction Summary
=================================================================================================================================================================================================
Install 87 Packages
Total download size: 96 M
Installed size: 512 M
Downloading Packages:
(1/87): checkpolicy-3.10-1.el10.x86_64.rpm 1.5 MB/s | 368 kB 00:00
(2/87): mariadb11.8-client-utils-11.8.6-2.el10_2.alma.1.noarch.rpm 626 kB/s | 66 kB 00:00
(3/87): mariadb11.8-11.8.6-2.el10_2.alma.1.x86_64.rpm 5.3 MB/s | 1.9 MB 00:00
(4/87): mariadb11.8-common-11.8.6-2.el10_2.alma.1.noarch.rpm 780 kB/s | 50 kB 00:00
(5/87): mariadb11.8-errmsg-11.8.6-2.el10_2.alma.1.noarch.rpm 1.3 MB/s | 214 kB 00:00
(6/87): mariadb11.8-gssapi-server-11.8.6-2.el10_2.alma.1.x86_64.rpm 158 kB/s | 16 kB 00:00
(7/87): mariadb11.8-backup-11.8.6-2.el10_2.alma.1.x86_64.rpm 11 MB/s | 6.7 MB 00:00
(8/87): mariadb11.8-server-utils-11.8.6-2.el10_2.alma.1.noarch.rpm 209 kB/s | 25 kB 00:00
(9/87): mysql-selinux-1.0.14-1.el10_0.noarch.rpm 189 kB/s | 37 kB 00:00
(10/87): perl-AutoLoader-5.74-512.2.el10_0.noarch.rpm 81 kB/s | 21 kB 00:00
(11/87): perl-Carp-1.54-511.el10.noarch.rpm 218 kB/s | 29 kB 00:00
(12/87): perl-B-1.89-512.2.el10_0.x86_64.rpm 748 kB/s | 176 kB 00:00
(13/87): perl-Class-Struct-0.68-512.2.el10_0.noarch.rpm 159 kB/s | 22 kB 00:00
(14/87): perl-DBD-MariaDB-1.23-10.el10.x86_64.rpm 941 kB/s | 153 kB 00:00
(15/87): mariadb11.8-server-11.8.6-2.el10_2.alma.1.x86_64.rpm 12 MB/s | 10 MB 00:00
(16/87): perl-Data-Dumper-2.189-512.el10.x86_64.rpm 528 kB/s | 56 kB 00:00
(17/87): perl-DBI-1.643-26.el10.x86_64.rpm 3.8 MB/s | 713 kB 00:00
(18/87): perl-Digest-1.20-511.el10.noarch.rpm 829 kB/s | 25 kB 00:00
(19/87): perl-Digest-MD5-2.59-6.el10.x86_64.rpm 1.2 MB/s | 36 kB 00:00
(20/87): perl-DynaLoader-1.56-512.2.el10_0.x86_64.rpm 731 kB/s | 26 kB 00:00
(21/87): perl-Errno-1.38-512.2.el10_0.x86_64.rpm 332 kB/s | 15 kB 00:00
(22/87): perl-Exporter-5.78-511.el10.noarch.rpm 593 kB/s | 31 kB 00:00
(23/87): perl-Encode-3.21-511.el10.x86_64.rpm 11 MB/s | 1.1 MB 00:00
(24/87): perl-Fcntl-1.18-512.2.el10_0.x86_64.rpm 558 kB/s | 29 kB 00:00
(25/87): perl-File-Basename-2.86-512.2.el10_0.noarch.rpm 557 kB/s | 17 kB 00:00
(26/87): perl-File-Copy-2.41-512.2.el10_0.noarch.rpm 686 kB/s | 20 kB 00:00
(27/87): perl-File-Path-2.18-512.el10.noarch.rpm 939 kB/s | 35 kB 00:00
(28/87): perl-File-Temp-0.231.100-512.el10.noarch.rpm 1.5 MB/s | 59 kB 00:00
(29/87): perl-File-stat-1.14-512.2.el10_0.noarch.rpm 516 kB/s | 17 kB 00:00
(30/87): perl-FileHandle-2.05-512.2.el10_0.noarch.rpm 631 kB/s | 15 kB 00:00
(31/87): perl-Getopt-Std-1.14-512.2.el10_0.noarch.rpm 599 kB/s | 15 kB 00:00
(32/87): perl-Getopt-Long-2.58-3.el10.noarch.rpm 1.6 MB/s | 67 kB 00:00
(33/87): perl-HTTP-Tiny-0.088-512.el10.noarch.rpm 1.7 MB/s | 56 kB 00:00
(34/87): perl-IO-Socket-IP-0.42-512.el10.noarch.rpm 1.6 MB/s | 42 kB 00:00
(35/87): perl-IO-1.55-512.2.el10_0.x86_64.rpm 2.0 MB/s | 77 kB 00:00
(36/87): perl-IO-Socket-SSL-2.085-3.el10.noarch.rpm 4.0 MB/s | 229 kB 00:00
(37/87): perl-IPC-Open3-1.22-512.2.el10_0.noarch.rpm 408 kB/s | 21 kB 00:00
(38/87): perl-MIME-Base64-3.16-511.el10.x86_64.rpm 611 kB/s | 30 kB 00:00
(39/87): perl-Math-BigInt-2.0030.03-3.el10.noarch.rpm 5.1 MB/s | 231 kB 00:00
(40/87): perl-Math-Complex-1.62-512.2.el10_0.noarch.rpm 1.3 MB/s | 46 kB 00:00
(41/87): perl-Mozilla-CA-20231213-5.el10.noarch.rpm 437 kB/s | 14 kB 00:00
(42/87): perl-NDBM_File-1.17-512.2.el10_0.x86_64.rpm 942 kB/s | 22 kB 00:00
(43/87): perl-POSIX-2.20-512.2.el10_0.x86_64.rpm 1.9 MB/s | 96 kB 00:00
(44/87): perl-Net-SSLeay-1.94-8.el10.x86_64.rpm 5.3 MB/s | 356 kB 00:00
(45/87): perl-PathTools-3.91-512.el10.x86_64.rpm 1.3 MB/s | 88 kB 00:00
(46/87): perl-Pod-Escapes-1.07-511.el10.noarch.rpm 533 kB/s | 20 kB 00:00
(47/87): perl-Pod-Perldoc-3.28.01-512.el10.noarch.rpm 1.6 MB/s | 88 kB 00:00
(48/87): perl-Pod-Usage-2.03-511.el10.noarch.rpm 1.1 MB/s | 40 kB 00:00
(49/87): perl-Pod-Simple-3.45-511.el10.noarch.rpm 4.1 MB/s | 222 kB 00:00
(50/87): perl-SelectSaver-1.02-512.2.el10_0.noarch.rpm 332 kB/s | 11 kB 00:00
(51/87): perl-Scalar-List-Utils-1.63-511.el10.x86_64.rpm 1.4 MB/s | 72 kB 00:00
(52/87): perl-Socket-2.038-511.el10.x86_64.rpm 1.5 MB/s | 54 kB 00:00
(53/87): perl-Symbol-1.09-512.2.el10_0.noarch.rpm 502 kB/s | 14 kB 00:00
(54/87): perl-Storable-3.32-511.el10.x86_64.rpm 2.1 MB/s | 98 kB 00:00
(55/87): perl-Sys-Hostname-1.25-512.2.el10_0.x86_64.rpm 530 kB/s | 17 kB 00:00
(56/87): perl-Term-ANSIColor-5.01-512.el10.noarch.rpm 1.7 MB/s | 48 kB 00:00
(57/87): perl-Term-Cap-1.18-511.el10.noarch.rpm 770 kB/s | 22 kB 00:00
(58/87): perl-Text-ParseWords-3.31-511.el10.noarch.rpm 484 kB/s | 16 kB 00:00
(59/87): perl-Text-Tabs+Wrap-2024.001-511.el10.noarch.rpm 761 kB/s | 22 kB 00:00
(60/87): perl-Time-Local-1.350-511.el10.noarch.rpm 1.5 MB/s | 34 kB 00:00
(61/87): perl-base-2.27-512.2.el10_0.noarch.rpm 573 kB/s | 16 kB 00:00
(62/87): perl-constant-1.33-512.el10.noarch.rpm 792 kB/s | 23 kB 00:00
(63/87): perl-URI-5.27-3.el10.noarch.rpm 2.7 MB/s | 137 kB 00:00
(64/87): perl-if-0.61.000-512.2.el10_0.noarch.rpm 530 kB/s | 14 kB 00:00
(65/87): perl-interpreter-5.40.2-512.2.el10_0.x86_64.rpm 1.7 MB/s | 72 kB 00:00
(66/87): perl-libnet-3.15-512.el10.noarch.rpm 2.4 MB/s | 130 kB 00:00
(67/87): perl-locale-1.12-512.2.el10_0.noarch.rpm 306 kB/s | 13 kB 00:00
(68/87): perl-mro-1.29-512.2.el10_0.x86_64.rpm 485 kB/s | 30 kB 00:00
(69/87): perl-overload-1.37-512.2.el10_0.noarch.rpm 751 kB/s | 45 kB 00:00
(70/87): perl-overloading-0.02-512.2.el10_0.noarch.rpm 232 kB/s | 13 kB 00:00
(71/87): perl-libs-5.40.2-512.2.el10_0.x86_64.rpm 13 MB/s | 2.2 MB 00:00
(72/87): perl-parent-0.241-512.el10.noarch.rpm 321 kB/s | 15 kB 00:00
(73/87): perl-podlators-5.01-511.el10.noarch.rpm 2.5 MB/s | 127 kB 00:00
(74/87): perl-vars-1.05-512.2.el10_0.noarch.rpm 325 kB/s | 13 kB 00:00
(75/87): policycoreutils-python-utils-3.10-1.el10.noarch.rpm 682 kB/s | 45 kB 00:00
(76/87): python3-distro-1.9.0-5.el10.noarch.rpm 23 kB/s | 51 kB 00:02
(77/87): python3-audit-4.0.3-5.el10.x86_64.rpm 31 kB/s | 68 kB 00:02
(78/87): python3-libsemanage-3.10-1.el10.x86_64.rpm 36 kB/s | 80 kB 00:02
(79/87): mariadb-connector-c-3.4.4-1.el10.x86_64.rpm 3.0 MB/s | 206 kB 00:00
(80/87): python3-setools-4.6.0-3.el10.x86_64.rpm 5.8 MB/s | 724 kB 00:00
(81/87): python3-policycoreutils-3.10-1.el10.noarch.rpm 11 MB/s | 2.1 MB 00:00
(82/87): mysql-community-common-9.7.1-1.el10.x86_64.rpm 491 kB/s | 641 kB 00:01
(83/87): mysql-community-client-plugins-9.7.1-1.el10.x86_64.rpm 987 kB/s | 1.5 MB 00:01
(84/87): mysql-community-client-9.7.1-1.el10.x86_64.rpm 1.8 MB/s | 3.4 MB 00:01
(85/87): mysql-community-libs-9.7.1-1.el10.x86_64.rpm 3.4 MB/s | 1.5 MB 00:00
(86/87): mysql-community-icu-data-files-9.7.1-1.el10.x86_64.rpm 3.5 MB/s | 2.3 MB 00:00
(87/87): mysql-community-server-9.7.1-1.el10.x86_64.rpm 18 MB/s | 56 MB 00:03
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 7.9 MB/s | 96 MB 00:12
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: Transaction test error:
file /usr/bin/mysql conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/bin/mysqladmin conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/bin/mysqlbinlog conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/bin/mysqlcheck conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/bin/mysqldump conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/bin/mysqlimport conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/bin/mysqlshow conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/bin/mysqlslap conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysql.1.gz conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysqladmin.1.gz conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysqlbinlog.1.gz conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysqlcheck.1.gz conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysqldump.1.gz conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysqlimport.1.gz conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysqlshow.1.gz conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysqlslap.1.gz conflicts between attempted installs of mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-client-9.7.1-1.el10.x86_64
file /usr/bin/my_print_defaults conflicts between attempted installs of mysql-community-server-9.7.1-1.el10.x86_64 and mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64
file /usr/bin/mysql_tzinfo_to_sql conflicts between attempted installs of mysql-community-server-9.7.1-1.el10.x86_64 and mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64
file /usr/bin/mysqldumpslow conflicts between attempted installs of mysql-community-server-9.7.1-1.el10.x86_64 and mariadb11.8-client-utils-3:11.8.6-2.el10_2.alma.1.noarch
file /usr/share/man/man1/my_print_defaults.1.gz conflicts between attempted installs of mysql-community-server-9.7.1-1.el10.x86_64 and mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64
file /usr/share/man/man1/mysql_tzinfo_to_sql.1.gz conflicts between attempted installs of mysql-community-server-9.7.1-1.el10.x86_64 and mariadb11.8-3:11.8.6-2.el10_2.alma.1.x86_64
file /usr/share/man/man1/mysqldumpslow.1.gz conflicts between attempted installs of mysql-community-server-9.7.1-1.el10.x86_64 and mariadb11.8-client-utils-3:11.8.6-2.el10_2.alma.1.noarch
file /usr/bin/innochecksum conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/bin/myisam_ftdump conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/bin/myisamchk conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/bin/myisamlog conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/bin/myisampack conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/bin/mysql_secure_installation conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/bin/perror conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/lib/systemd/system/mysqld.service conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/sbin/mysqld conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/share/man/man1/innochecksum.1.gz conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/share/man/man1/myisam_ftdump.1.gz conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/share/man/man1/myisamchk.1.gz conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/share/man/man1/myisamlog.1.gz conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/share/man/man1/myisampack.1.gz conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/share/man/man1/mysql_secure_installation.1.gz conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/share/man/man1/perror.1.gz conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /usr/share/man/man8/mysqld.8.gz conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
file /var/lib/mysql conflicts between attempted installs of mariadb11.8-server-3:11.8.6-2.el10_2.alma.1.x86_64 and mysql-community-server-9.7.1-1.el10.x86_64
[root@alamalinux102 ~]<QQ>
----
下面是解决过程:
[root@alamalinux102 ~]<QQ>cd /etc/yum.repos.d/
[root@alamalinux102 /etc/yum.repos.d]<QQ>rm -fr mysql-community*
[root@alamalinux102 /etc/yum.repos.d]<QQ>cd
[root@alamalinux102 ~]<QQ>yum install -y perl
AlmaLinux 10 - AppStream 1.0 MB/s | 2.1 MB 00:02
AlmaLinux 10 - BaseOS 4.2 MB/s | 8.9 MB 00:02
AlmaLinux 10 - CRB 282 kB/s | 499 kB 00:01
AlmaLinux 10 - Extras 1.4 kB/s | 7.3 kB 00:05
Docker CE Stable - x86_64 17 kB/s | 23 kB 00:01
Kubernetes 8.5 kB/s | 7.0 kB 00:00
Dependencies resolved.
=================================================================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================================================================
Installing:
perl x86_64 4:5.40.2-512.2.el10_0 appstream 13 k
Installing dependencies:
annobin-docs noarch 13.02-2.el10 appstream 87 k
...
rust-toolset-srpm-macros-1.92.0-1.el10.alma.1.noarch sombok-2.4.0-23.el10.x86_64 systemtap-sdt-devel-5.4-3.el10.x86_64
systemtap-sdt-dtrace-5.4-3.el10.x86_64 unzip-6.0-69.el10.x86_64 zip-3.0-45.el10.x86_64
Complete!
[root@alamalinux102 ~]<QQ>yum install -y openssl
Last metadata expiration check: 0:00:39 ago on Tue 23 Jun 2026 11:19:24 AM CST.
Dependencies resolved.
=================================================================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================================================================
Installing:
openssl x86_64 1:3.5.5-4.el10_2.alma.1 baseos 1.2 M
Transaction Summary
=================================================================================================================================================================================================
Install 1 Package
Total download size: 1.2 M
Installed size: 1.8 M
Downloading Packages:
openssl-3.5.5-4.el10_2.alma.1.x86_64.rpm 4.4 MB/s | 1.2 MB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 732 kB/s | 1.2 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : openssl-1:3.5.5-4.el10_2.alma.1.x86_64 1/1
Running scriptlet: openssl-1:3.5.5-4.el10_2.alma.1.x86_64 1/1
Installed:
openssl-1:3.5.5-4.el10_2.alma.1.x86_64
Complete!
[root@alamalinux102 ~]<QQ>yum install -y openssl-devel
Last metadata expiration check: 0:01:35 ago on Tue 23 Jun 2026 11:19:24 AM CST.
Dependencies resolved.
=================================================================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================================================================
Installing:
openssl-devel x86_64 1:3.5.5-4.el10_2.alma.1 appstream 2.9 M
Transaction Summary
=================================================================================================================================================================================================
Install 1 Package
Total download size: 2.9 M
Installed size: 4.4 M
Downloading Packages:
openssl-devel-3.5.5-4.el10_2.alma.1.x86_64.rpm 7.4 MB/s | 2.9 MB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.6 MB/s | 2.9 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : openssl-devel-1:3.5.5-4.el10_2.alma.1.x86_64 1/1
Running scriptlet: openssl-devel-1:3.5.5-4.el10_2.alma.1.x86_64 1/1
Installed:
openssl-devel-1:3.5.5-4.el10_2.alma.1.x86_64
Complete!
[root@alamalinux102 ~]<QQ>yum install -y perl-json
Last metadata expiration check: 0:01:59 ago on Tue 23 Jun 2026 11:19:24 AM CST.
No match for argument: perl-json
* Maybe you meant: perl-JSON
Error: Unable to find a match: perl-json
[root@alamalinux102 ~]<QQ>yum install -y perl-JSON
Last metadata expiration check: 0:02:46 ago on Tue 23 Jun 2026 11:19:24 AM CST.
Dependencies resolved.
=================================================================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================================================================
Installing:
perl-JSON noarch 4.10-7.el10 appstream 94 k
Transaction Summary
=================================================================================================================================================================================================
Install 1 Package
Total download size: 94 k
Installed size: 270 k
Downloading Packages:
perl-JSON-4.10-7.el10.noarch.rpm 187 kB/s | 94 kB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 50 kB/s | 94 kB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : perl-JSON-4.10-7.el10.noarch 1/1
Running scriptlet: perl-JSON-4.10-7.el10.noarch 1/1
Installed:
perl-JSON-4.10-7.el10.noarch
Complete!
[root@alamalinux102 ~]<QQ>mkdir mysql
[root@alamalinux102 ~]<QQ>cd mysql/
[root@alamalinux102 ~/mysql]<QQ>ll
total 0
[root@alamalinux102 ~/mysql]<QQ>wget https://dev.mysql.com/get/Downloads/MySQL-9.7/mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar
--2026-06-23 11:09:07-- https://dev.mysql.com/get/Downloads/MySQL-9.7/mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar
Resolving dev.mysql.com (dev.mysql.com)... 23.59.130.206, 2600:1417:e:283::2e31, 2600:1417:e:29e::2e31
Connecting to dev.mysql.com (dev.mysql.com)|23.59.130.206|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://cdn.mysql.com//Downloads/MySQL-9.7/mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar [following]
--2026-06-23 11:09:13-- https://cdn.mysql.com//Downloads/MySQL-9.7/mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar
Resolving cdn.mysql.com (cdn.mysql.com)... 23.59.1.189, 2600:1417:e:294::1d68, 2600:1417:e:287::1d68
Connecting to cdn.mysql.com (cdn.mysql.com)|23.59.1.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 942786560 (899M) [application/x-tar]
Saving to: ‘mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar’
mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar 100%[=======================================================================================================>] 899.11M 15.4MB/s in 72s
2026-06-23 11:10:26 (12.5 MB/s) - ‘mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar’ saved [942786560/942786560]
[root@alamalinux102 ~/mysql]<QQ>ll
total 920692
-rw-r--r-- 1 root root 942786560 Jun 10 15:11 mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar
[root@alamalinux102 ~/mysql]<QQ>tar -xf mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar
[root@alamalinux102 ~/mysql]<QQ>rm -fr mysql-9.7.1-1.el10.x86_64.rpm-bundle.tar
[root@alamalinux102 ~/mysql]<QQ>rpm -ivh ./mysql*
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:mysql-community-debugsource-9.7.1################################# [ 6%]
2:mysql-community-debuginfo-9.7.1-1################################# [ 12%]
3:mysql-community-common-9.7.1-1.el################################# [ 18%]
4:mysql-community-client-plugins-9.################################# [ 24%]
5:mysql-community-libs-9.7.1-1.el10################################# [ 29%]
6:mysql-community-client-9.7.1-1.el################################# [ 35%]
7:mysql-community-icu-data-files-9.################################# [ 41%]
8:mysql-community-server-9.7.1-1.el################################# [ 47%]
9:mysql-community-server-debug-9.7.################################# [ 53%]
10:mysql-community-test-9.7.1-1.el10################################# [ 59%]
11:mysql-community-devel-9.7.1-1.el1################################# [ 65%]
12:mysql-community-client-debuginfo-################################# [ 71%]
13:mysql-community-client-plugins-de################################# [ 76%]
14:mysql-community-libs-debuginfo-9.################################# [ 82%]
15:mysql-community-server-debug-debu################################# [ 88%]
16:mysql-community-server-debuginfo-################################# [ 94%]
17:mysql-community-test-debuginfo-9.################################# [100%]
[root@alamalinux102 ~/mysql]<QQ>systemctl enable --now mysqld
[root@alamalinux102 ~/mysql]<QQ>systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; preset: 5:185mdisabled)
Active: active (running) since Tue 2026-06-23 11:23:52 CST; 8s ago
Invocation: 1deb36771b5b406a978b0569b0ac8d73
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 9372 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 9454 (mysqld)
Status: "Server is operational"
Tasks: 36 (limit: 22823)
Memory: 454.2M (peak: 465.9M)
CPU: 1.737s
CGroup: /system.slice/mysqld.service
└─9454 /usr/sbin/mysqld
Jun 23 11:23:32 alamalinux102 systemd[1]: Starting mysqld.service - MySQL Server...
Jun 23 11:23:51 alamalinux102 (mysqld)[9454]: 5:185m5:185mmysqld.service: Referenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS
Jun 23 11:23:52 alamalinux102 systemd[1]: Started mysqld.service - MySQL Server.
[root@alamalinux102 ~/mysql]<QQ>cat /var/log/
anaconda/ dnf.librepo.log lastlog mysqld.log.00.json sssd/ vmware-network.6.log vmware-vmsvc-root.log
audit/ dnf.log maillog private/ vmware-network.1.log vmware-network.7.log vmware-vmtoolsd-root.log
btmp dnf.rpm.log maillog-20260622 secure vmware-network.2.log vmware-network.8.log wtmp
chrony/ firewalld messages secure-20260622 vmware-network.3.log vmware-network.9.log
cron hawkey.log messages-20260622 spooler vmware-network.4.log vmware-network.log
cron-20260622 hawkey.log-20260622 mysqld.log spooler-20260622 vmware-network.5.log vmware-vgauthsvc.log.0
[root@alamalinux102 ~/mysql]<QQ>cat /var/log/
anaconda/ dnf.librepo.log lastlog mysqld.log.00.json sssd/ vmware-network.6.log vmware-vmsvc-root.log
audit/ dnf.log maillog private/ vmware-network.1.log vmware-network.7.log vmware-vmtoolsd-root.log
btmp dnf.rpm.log maillog-20260622 secure vmware-network.2.log vmware-network.8.log wtmp
chrony/ firewalld messages secure-20260622 vmware-network.3.log vmware-network.9.log
cron hawkey.log messages-20260622 spooler vmware-network.4.log vmware-network.log
cron-20260622 hawkey.log-20260622 mysqld.log spooler-20260622 vmware-network.5.log vmware-vgauthsvc.log.0
[root@alamalinux102 ~/mysql]<QQ>cat /var/log/mysqld.log
2026-06-23T03:23:32.377891Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2026-06-23T03:23:32.379057Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 9.7.1) initializing of server in progress as process 9398
2026-06-23T03:23:32.385281Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-06-23T03:23:50.054082Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-06-23T03:23:50.583839Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: pnZQRSy,V7d:
2026-06-23T03:23:51.915929Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
2026-06-23T03:23:52.003203Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2026-06-23T03:23:52.310065Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.7.1) starting as process 9454
2026-06-23T03:23:52.310073Z 0 [System] [MY-015603] [Server] MySQL Server has access to 4 logical CPUs.
2026-06-23T03:23:52.310080Z 0 [System] [MY-015603] [Server] MySQL Server has access to 3797028864 bytes of physical memory.
2026-06-23T03:23:52.320165Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-06-23T03:23:52.424271Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-06-23T03:23:52.598148Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2026-06-23T03:23:52.598172Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2026-06-23T03:23:52.616198Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2026-06-23T03:23:52.616265Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '9.7.1' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL.
[root@alamalinux102 ~/mysql]<QQ>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 9.7.1
Copyright (c) 2000, 2026, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> alter user 'root'@'localhost' identified by 'Sh^Q@xWtgELr6L';
Query OK, 0 rows affected (0.006 sec)
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update mysql.user set host='%' where user='root';
Query OK, 1 row affected (0.003 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql>
mysql> exit
Bye
[root@alamalinux102 ~/mysql]<QQ>uname -a
Linux alamalinux102 6.12.0-211.22.1.el10_2.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 08:11:48 EDT 2026 x86_64 GNU/Linux
[root@alamalinux102 ~/mysql]<QQ>ll
更多推荐




所有评论(0)