MySQL8.4编译安装和MySQL8.1差不多,参考本站文章『MySQL8.1编译安装详细教程』操作即可,下面给出的cmake参数(亲测可用):
[root@localhost bld]# cmake .. \
-DCMAKE_INSTALL_PREFIX=/program/mysql-8.4 \
-DSYSCONFDIR=/program/mysql-8.4 \
-DMYSQL_DATADIR=/program/mysql-8.4/data \
-DDEFAULT_CHARSET=utf8mb4 \
-DDEFAULT_COLLATION=utf8mb4_unicode_ci \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
-DFORCE_INSOURCE_BUILD=1 \
-DMYSQL_TCP_PORT=3308