NDB Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture enables the system to work with very inexpensive hardware, and with a minimum of specific requirements for hardware or software. [2]
从 MySQL 集群架构来说,推荐使用 InnoDB Cluster,而非 NDB Cluster,所以,在预编译时加入参数 (WITH_NDBCLUSTER_STORAGE_ENGINE=OFF) 跳过该引擎。
[root@rocky9 debug]# grep Built make.log [ 1%] Built target INFO_SRC [ 1%] Built target stack_direction [ 1%] Built target abi_check [ 1%] Built target lz4_lib [ 2%] Built target zlib_objlib [ 2%] Built target icustubdata [ 3%] Built target zstd_objlib [ 5%] Built target uca9dump [ 8%] Built target vio_objlib [ 8%] Built target libprotobuf-lite [ 11%] Built target mytime_objlib [ 11%] Built target mysql_gtid [ 14%] Built target all_sys_schema [ 14%] Built target comp_sql [ 14%] Built target gen_lex_hash [ 14%] Built target GenBootstrapPriv [ 14%] Built target GenFixPrivs [ 14%] Built target libedit_emacs [ 14%] Built target libedit_vi [ 14%] Built target libedit_common [ 15%] Built target libedit_help [ 15%] Built target libedit_func [ 15%] Built target event_pthreads [ 16%] Built target event_core [ 18%] Built target build_id_test [ 18%] Built target icuuc [ 19%] Built target mysys_objlib [ 20%] Built target mysqlservices [ 20%] Built target oci_common_objlib [ 20%] Built target GenLiteProtos [ 20%] Built target library_mysys [ 20%] Built target decimal_objlib [ 20%] Built target zlib [ 20%] Built target mysqltest_safe_process [ 20%] Built target zstd [ 20%] Built target strings_ja_hans [ 20%] Built target strings_zh_hans [ 20%] Built target vio [ 21%] Built target mytime [ 22%] Built target sql_commands [ 22%] Built target GenServerSource [ 22%] Built target libedit_fcns [ 23%] Built target event_openssl [ 23%] Built target event_extra [ 25%] Built target changestreams_standalone_static [ 25%] Built target oci_common [ 25%] Built target decimal [ 25%] Built target GenSysSchemaC [ 27%] Built target mysql_binlog_event_standalone [ 27%] Built target icui18n [ 27%] Built target GenSysSchema [ 28%] Built target gen_keyword_list [ 28%] Built target gen_lex_token [ 29%] Built target mysqlgcs [ 29%] Built target GenKeywordList [ 29%] Built target GenDigestServerSource [ 31%] Built target edit [ 31%] Built target strings_objlib [ 32%] Built target strings [ 32%] Built target strings_shared [ 32%] Built target conf_to_src [ 32%] Built target mysys [ 32%] Built target comp_err [ 32%] Built target thr_lock [ 33%] Built target mf_iocache_test [ 34%] Built target mysql_ssl_rsa_setup [ 34%] Built target comp_client_err [ 34%] Built target my_print_defaults [ 34%] Built target lz4_decompress [ 34%] Built target zlib_decompress [ 34%] Built target GenError [ 34%] Built target GenClientError [ 34%] Built target range_check_err [ 34%] Built target perror [ 34%] Built target mysql_tzinfo_to_sql [ 34%] Built target udf_example [ 34%] Built target locking_service [ 34%] Built target csv [ 34%] Built target libprotobuf [ 37%] Built target heap_library [ 37%] Built target mysql_binlog_event [ 38%] Built target myisammrg [ 38%] Built target ngram_parser [ 38%] Built target temptable [ 39%] Built target mysql_native_password [ 40%] Built target minchassis [ 40%] Built target myisam_library [ 40%] Built target installed_headers [ 41%] Built target archive [ 42%] Built target clientlib_objlib [ 43%] Built target blackhole [ 44%] Built target example [ 44%] Built target federated [ 46%] Built target innodb_zipdecompress [ 46%] Built target myisam_ftdump [ 46%] Built target myisamchk [ 46%] Built target mysql_server_component_services [ 46%] Built target myisamlog [ 46%] Built target myisampack [ 46%] Built target test_security_context [ 46%] Built target audit_null [ 46%] Built target auth [ 46%] Built target qa_auth_client [ 46%] Built target auth_test_plugin [ 46%] Built target mock [ 46%] Built target qa_auth_server [ 46%] Built target qa_auth_interface [ 46%] Built target mysql_no_login [ 46%] Built target auth_socket [ 46%] Built target daemon_example [ 46%] Built target ddl_rewriter [ 46%] Built target ftexample [ 46%] Built target connection_control [ 46%] Built target clone [ 46%] Built target keyring_udf [ 47%] Built target validate_password [ 47%] Built target pfs_example_plugin_employee [ 48%] Built target rewrite_example [ 48%] Built target replication_observers_example [ 48%] Built target rewriter [ 48%] Built target keyring_file [ 48%] Built target semisync_source [ 48%] Built target semisync_replica [ 50%] Built target semisync_master [ 50%] Built target conflicting_variables [ 51%] Built target semisync_slave [ 51%] Built target test_sql_replication [ 51%] Built target test_sql_reset_connection [ 51%] Built target test_sql_sqlmode [ 51%] Built target test_sql_lock [ 51%] Built target test_sql_commit [ 51%] Built target test_session_attach [ 51%] Built target test_session_detach [ 51%] Built target test_sql_stmt [ 51%] Built target test_sql_complex [ 51%] Built target test_sql_processlist [ 51%] Built target test_sql_errors [ 51%] Built target test_x_sessions_deinit [ 51%] Built target test_sql_stored_procedures_functions [ 51%] Built target test_session_info [ 51%] Built target test_x_sessions_init [ 51%] Built target test_sql_all_col_types [ 51%] Built target test_sql_views_triggers [ 51%] Built target test_sql_2_sessions [ 51%] Built target test_session_in_thd [ 51%] Built target test_sql_shutdown [ 51%] Built target test_sql_sleep_is_connected [ 51%] Built target test_sql_cmds_1 [ 51%] Built target test_services_host_application_signal [ 51%] Built target test_services_thread [ 51%] Built target test_framework [ 51%] Built target test_services_plugin_registry [ 52%] Built target test_services [ 52%] Built target test_services_command_services [ 52%] Built target test_udf_services [ 52%] Built target version_token [ 52%] Built target component_audit_api_message_emit [ 52%] Built target component_example_component1 [ 52%] Built target component_example_component2 [ 53%] Built target component_example_component3 [ 53%] Built target component_test_string_service_charset [ 54%] Built target component_test_string_service [ 54%] Built target component_test_string_service_long [ 54%] Built target component_test_backup_lock_service [ 54%] Built target component_log_sink_test [ 55%] Built target component_log_filter_dragnet [ 55%] Built target component_log_sink_json [ 55%] Built target component_log_sink_syseventlog [ 55%] Built target component_mysqlbackup [ 55%] Built target component_pfs_example_component_population [ 55%] Built target component_pfs_example [ 56%] Built target component_query_attributes [ 56%] Built target keyring_common_objlib [ 56%] Built target component_test_event_tracking_consumer [ 56%] Built target component_reference_cache [ 57%] Built target component_test_sys_var_service_int [ 57%] Built target component_test_sys_var_service [ 57%] Built target component_test_system_variable_source [ 57%] Built target component_udf_unreg_real_func [ 57%] Built target component_udf_reg_avg_func [ 57%] Built target component_udf_reg_int_same_func [ 57%] Built target component_udf_reg_only_3_func [ 57%] Built target component_udf_reg_int_func [ 57%] Built target component_udf_unreg_3_func [ 57%] Built target component_test_sys_var_service_same [ 57%] Built target component_udf_reg_3_func [ 57%] Built target component_test_status_var_service [ 57%] Built target component_test_status_var_reader [ 58%] Built target component_udf_reg_real_func [ 58%] Built target component_test_udf_registration [ 58%] Built target component_test_sys_var_service_str [ 58%] Built target component_test_status_var_service_reg_only [ 58%] Built target component_udf_unreg_int_func [ 58%] Built target component_test_status_var_service_int [ 58%] Built target component_test_audit_api_message [ 58%] Built target component_test_status_var_service_str [ 58%] Built target component_test_mysql_thd_store_service [ 58%] Built target component_test_mysql_runtime_error [ 58%] Built target component_test_mysql_current_thread_reader [ 58%] Built target component_test_sensitive_system_variables [ 58%] Built target component_test_status_var_service_unreg_only [ 58%] Built target component_test_host_application_signal [ 58%] Built target component_test_component_deinit [ 58%] Built target component_test_mysql_command_services [ 59%] Built target component_test_mysql_system_variable_set [ 59%] Built target component_test_server_telemetry_metrics [ 59%] Built target component_test_server_telemetry_traces [ 59%] Built target component_validate_password [ 61%] Built target mysql_test_event_tracking [ 61%] Built target component_test_event_tracking_producer_a [ 61%] Built target component_test_event_tracking_producer_b [ 61%] Built target component_test_event_tracking_consumer_a [ 61%] Built target component_test_event_tracking_consumer_b [ 61%] Built target component_test_event_tracking_consumer_c [ 61%] Built target mysql_keyring_encryption_test [ 61%] Built target component_test_pfs_notification [ 61%] Built target component_test_table_access [ 61%] Built target component_test_pfs_resource_group [ 61%] Built target component_test_udf_services [ 61%] Built target perfschema [ 61%] Built target ibd2sdi [ 61%] Built target innochecksum [ 61%] Built target heap [ 62%] Built target json_client_library_objlib [ 62%] Built target clientlib [ 62%] Built target json_binlog [ 62%] Built target keyring_common [ 62%] Built target json_client_library [ 62%] Built target json_binlog_main [ 62%] Built target myisam [ 62%] Built target libmysql [ 62%] Built target mysqlclient [ 62%] Built target component_keyring_file [ 62%] Built target json_binlog_static [ 62%] Built target mysqlshow [ 63%] Built target mysqlimport [ 63%] Built target mysqldump [ 63%] Built target mysqlcheck [ 64%] Built target mysqltest [ 64%] Built target json_client_library_main [ 64%] Built target mysqladmin [ 64%] Built target client_base [ 64%] Built target mysql_secure_installation [ 64%] Built target mysql_config_editor [ 64%] Built target json_binlog_main_static [ 64%] Built target mysqlslap [ 64%] Built target mysql_migrate_keyring [ 64%] Built target mysql_client_test [ 66%] Built target libmysql_api_test [ 66%] Built target mysql_upgrade [ 66%] Built target libprotoc [ 66%] Built target protoc [ 66%] Built target run_libmysql_api_test [ 67%] Built target gr_protobuf_lite [ 67%] Built target mysql [ 69%] Built target mysqlpump_lib [ 69%] Built target rpl_protobuf_lite [ 69%] Built target mysqlbinlog [ 69%] Built target mysqlxmessages [ 69%] Built target mysqlpump [ 69%] Built target mysqlxmessages_lite [ 69%] Built target xprotocol_plugin [ 71%] Built target mysqlxclient_lite [ 71%] Built target mysqlxclient [ 76%] Built target group_replication [ 84%] Built target sql_main [ 84%] Built target rpl_source [ 89%] Built target sql_dd [ 90%] Built target rpl_replica [ 92%] Built target sql_gis [ 93%] Built target binlog [ 93%] Built target rpl [100%] Built target innobase [100%] Built target mysqld [100%] Built target INFO_BIN
编译耗时:real 73m, user 231m.
安装数据库,查看安装后的目录。
1 2 3 4 5 6 7 8 9 10 11
[root@rocky9 mysql]# ll total 292 drwxr-xr-x. 2 root root 4096 Nov 10 00:19 bin drwxr-xr-x. 2 root root 38 Nov 10 00:19 docs drwxr-xr-x. 3 root root 4096 Nov 10 00:19 include drwxr-xr-x. 5 root root 187 Nov 10 00:19 lib -rw-r--r--. 1 root root 279351 Oct 12 19:40 LICENSE drwxr-xr-x. 4 root root 30 Nov 10 00:19 man -rw-r--r--. 1 root root 666 Oct 12 19:40 README drwxr-xr-x. 28 root root 4096 Nov 10 00:19 share drwxr-xr-x. 2 root root 77 Nov 10 00:19 support-files
运行数据库。
1 2 3 4 5 6 7 8
[mysql@rocky9 mysql]$ /usr/local/mysql/bin/mysqld 2023-11-09T16:07:52.428069Z 0 [System] [MY-015015] [Server] MySQL Server - start. 2023-11-09T16:07:53.115177Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.2.0-ShawnYan-debug) starting as process 146906 2023-11-09T16:07:53.174965Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2023-11-09T16:07:53.963537Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2023-11-09T16:07:57.246800Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2023-11-09T16:07:57.246958Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2023-11-09T16:07:57.584185Z 0 [System] [MY-010931] [Server] /usr/local/mysql/bin/mysqld: ready for connections. Version: '8.2.0-ShawnYan-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution.
[root@rocky9 bin]# ./mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.2.0-ShawnYan-debug Source distribution
Copyright (c) 2000, 2023, 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> select version(); +----------------------+ | version() | +----------------------+ | 8.2.0-ShawnYan-debug | +----------------------+ 1 row in set (0.00 sec)
总结
到此,MySQL 8.2.0 编译选项就先介绍到这里,在实际的测试或者生产环境中,可以依据实际项目需求,来增加、减少存储引擎或插件,当然,ALL IN ONE 也不是不可。
In short,本文介绍了 MySQL 的常见存储引擎,MySQL X 协议,和 Router,并提供了编译选项以供参考。