标题: 基于ORACLE LINUX 10.1 MYSQL 8.4 源码安装 [打印本页] 作者: 郑全 时间: 2026-3-13 18:55 标题: 基于ORACLE LINUX 10.1 MYSQL 8.4 源码安装 本帖最后由 郑全 于 2026-3-14 10:44 编辑
基于ORACLE LINUX 10.1 MYSQL 8.4 源码安装
看了官网,我向选择二级制安装MYSQL,结果发现针对ORACLE Linux 10,官方只有RPM安装包,没有二进制的10的安装包,有的只是针对 glibc2.28,2.17的二进制安装文件
,没有办法,只有自己动手,使用源码安装。
glibc2.28 针对 red hat linux 8
glibc2.17 针对 red hat linux 7
11、修改密码
/usr/local/mysql/bin/mysql -S /data/mysql/mysql_3306/tmp/mysql_3306.sock -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'sztech_4U' PASSWORD EXPIRE NEVER ;
mysql> create USER 'root'@'127.0.0.1' IDENTIFIED BY 'sztech_4U' PASSWORD EXPIRE NEVER ;
mysql> grant all privileges on *.* to 'root'@'127.0.0.1' with grant option;
12、登录验证
mysql -h 127.0.0.1 -uroot -p
[root@sz-mgr-db01 ~]# mysql -uroot -h127.0.0.1 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.4.8 Source distribution
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 8.4在ORACLE LINUX 8.1上的源码安装完毕。
如果前面的提前包安装上,就没有问题,否则,编译就有问题。
作者: 郑全 时间: 2026-3-14 10:46
cmake 安装报错之一:
root@mgr1 mysql-8.4.8]# cmake . \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/data/mysql/ \
-DSYSCONFDIR=/etc/ \
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DWITH_ARCHIVE_STORAGE_ENGINE=1\
-DWITH_BLACKHOLE_STORAGE_ENGINE=1\
-DWITH_DEBUG=0\
-DWITH_SSL=system \
-DWITH_LIBWRAP=0\
-DENABLED_LOCAL_INFILE=1\
-DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock \
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_general_ci \
-DFORCE_INSOURCE_BUILD=1\
-DWITH_SYSTEMD=1
-- Running cmake version 3.30.5
-- Could NOT find Git (missing: GIT_EXECUTABLE)
Hint: The project() command has not yet been called. It sets up system-specific search paths.
-- This is .el10. as found from 'rpm -qf /'
-- CMAKE_MODULE_PATH is /root/mysql-8.4.8/cmake
-- MySQL 8.4.8
-- The C compiler identification is GNU 14.3.1
-- The CXX compiler identification is GNU 14.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Source directory /root/mysql-8.4.8
-- Binary directory /root/mysql-8.4.8
CMake Warning at CMakeLists.txt:578 (MESSAGE):
This is an in-source build
-- CMAKE_GENERATOR: Unix Makefiles
-- Looking for SHM_HUGETLB
-- Looking for SHM_HUGETLB - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void *
-- Check size of void * - done
-- SIZEOF_VOIDP 8
-- Performing Test HAVE_C_FLOATING_POINT_FUSED_MADD
-- Performing Test HAVE_C_FLOATING_POINT_FUSED_MADD - Failed
-- Performing Test HAVE_CXX_FLOATING_POINT_FUSED_MADD
-- Performing Test HAVE_CXX_FLOATING_POINT_FUSED_MADD - Failed
-- Found verified platform LINUX for libbacktrace
-- Packaging as: mysql-8.4.8-Linux-x86_64
-- BOOST_PATCHES_DIR /root/mysql-8.4.8/include/boost_1_84_0/patches
-- BOOST_INCLUDE_DIR /root/mysql-8.4.8/extra/boost/boost_1_84_0
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Looking for floor
-- Looking for floor - not found
-- Looking for floor in m
-- Looking for floor in m - found
-- Looking for gethostbyname_r
-- Looking for gethostbyname_r - found
-- Looking for bind
-- Looking for bind - found
-- Looking for setsockopt
-- Looking for setsockopt - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for dlsym
-- Looking for dlsym - found
-- Looking for sched_yield
-- Looking for sched_yield - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for timer_create
-- Looking for timer_create - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Performing Test HAVE_LIBWRAP
-- Performing Test HAVE_LIBWRAP - Failed
CMake Error at configure.cmake:173 (MESSAGE):
WITH_LIBWRAP is defined, but can not find a working libwrap. Make sure
both the header files (tcpd.h) and the library (libwrap) are installed.
Call Stack (most recent call first):
CMakeLists.txt:1595 (INCLUDE)
-- Performing Test X_PUTLONG_NOT_USE_CONST
-- Performing Test X_PUTLONG_NOT_USE_CONST - Failed
CMake Warning at cmake/rpc.cmake:30 (MESSAGE):
Cannot find rpcgen executable. You need to install the required packages: