本帖最后由 lb8125 于 2024-1-28 22:51 编辑 centos 7 二进制安装启动失败,各位有什么建议 [root@mysqln2 ~]# systemctl daemon-reload [root@mysqln2 ~]# mkdir -p /var/lib/mysql-files && chown -R mysql:mysql /var/lib/mysql-files [root@mysqln2 ~]# systemctl start greatsql Job for greatsql.service failed because the control process exited with error code. See "systemctl status greatsql.service" and "journalctl -xe" for details. [root@mysqln2 ~]# systemctl status greatsql.service ● greatsql.service - GreatSQL Server Loaded: loaded (/usr/lib/systemd/system/greatsql.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2024-01-28 18:18:15 CST; 12s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 1793 ExecStart=/usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE) Process: 1753 ExecStartPre=/usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Main PID: 1793 (code=exited, status=1/FAILURE) Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI...n/mysqld) Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.28'...n/mysqld) Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.28'...o.3.19.4) Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCX...o.3.19.4) Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI...o.3.19.4) Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI...o.3.19.4) Jan 28 18:18:15 mysqln2 systemd[1]: greatsql.service: main process exited, code=exited, status=1/FAILURE Jan 28 18:18:15 mysqln2 systemd[1]: Failed to start GreatSQL Server. Jan 28 18:18:15 mysqln2 systemd[1]: Unit greatsql.service entered failed state. Jan 28 18:18:15 mysqln2 systemd[1]: greatsql.service failed. Hint: Some lines were ellipsized, use -l to show in full. [root@mysqln2 ~]# journalctl -xe Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.28' not found ( Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.28' not found ( Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' no Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not Jan 28 18:18:15 mysqln2 mysqld_pre_systemd[1753]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' no Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (requ Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (requi Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (req Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (req Jan 28 18:18:15 mysqln2 systemd[1]: greatsql.service: main process exited, code=exited, status=1/FAILURE Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (req Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (requi Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (req Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (requi Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (requi Jan 28 18:18:15 mysqln2 mysqld[1793]: /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (req Jan 28 18:18:15 mysqln2 systemd[1]: Failed to start GreatSQL Server. -- Subject: Unit greatsql.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit greatsql.service has failed. -- -- The result is failed. Jan 28 18:18:15 mysqln2 systemd[1]: Unit greatsql.service entered failed state. Jan 28 18:18:15 mysqln2 systemd[1]: greatsql.service failed. Jan 28 18:18:15 mysqln2 polkitd[805]: Unregistered Authentication Agent for unix-process:1747:125995 (system bus name :1.66, object path /org/freedesktop/PolicyKit1/ Jan 28 18:19:01 mysqln2 systemd[1]: Started Session 25 of user root. -- Subject: Unit session-25.scope has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit session-25.scope has finished starting up. -- -- The start-up result is done. Jan 28 18:19:01 mysqln2 CROND[1798]: (root) CMD ( /usr/lib64/sa/sa1 1 1) lines 2217-2256/2256 (END) 配置文件: [root@mysqln2 ~]# cat /etc/my.cnf [client] user = root socket = /data/GreatSQL/mysql.sock [mysqld] user = mysql port = 3306 #主从复制或MGR集群中,server_id记得要不同 #另外,实例启动时会生成 auto.cnf,里面的 server_uuid 值也要不同 #server_uuid的值还可以自己手动指定,只要符合uuid的格式标准就可以 server_id = 3307 basedir = /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64 datadir = /data/GreatSQL socket = /data/GreatSQL/mysql.sock pid-file = mysql.pid character-set-server = UTF8MB4 skip_name_resolve = 1 #若你的MySQL数据库主要运行在境外,请务必根据实际情况调整本参数 default_time_zone = "+8:00" #performance setttings lock_wait_timeout = 3600 open_files_limit = 65535 back_log = 1024 max_connections = 512 max_connect_errors = 1000000 table_open_cache = 1024 table_definition_cache = 1024 thread_stack = 512K sort_buffer_size = 4M join_buffer_size = 4M read_buffer_size = 8M read_rnd_buffer_size = 4M bulk_insert_buffer_size = 64M thread_cache_size = 768 interactive_timeout = 600 wait_timeout = 600 tmp_table_size = 32M max_heap_table_size = 32M max_allowed_packet = 64M net_buffer_shrink_interval = 180 #GIPK loose-sql_generate_invisible_primary_key = ON #log settings log_timestamps = SYSTEM log_error = error.log log_error_verbosity = 3 slow_query_log = 1 log_slow_extra = 1 slow_query_log_file = slow.log #设置slow log文件大小1G及总文件数10 max_slowlog_size = 1073741824 max_slowlog_files = 10 long_query_time = 0.1 log_queries_not_using_indexes = 1 log_throttle_queries_not_using_indexes = 60 min_examined_row_limit = 100 log_slow_admin_statements = 1 log_slow_slave_statements = 1 log_bin = binlog binlog_format = ROW sync_binlog = 1 binlog_cache_size = 4M max_binlog_cache_size = 2G max_binlog_size = 1G #控制binlog总大小,避免磁盘空间被撑爆 binlog_space_limit = 10G binlog_rows_query_log_events = 1 binlog_expire_logs_seconds = 604800 #MySQL 8.0.22前,想启用MGR的话,需要设置binlog_checksum=NONE才行 binlog_checksum = CRC32 gtid_mode = ON enforce_gtid_consistency = TRUE #myisam settings key_buffer_size = 32M myisam_sort_buffer_size = 128M #replication settings relay_log_recovery = 1 slave_parallel_type = LOGICAL_CLOCK #可以设置为逻辑CPU数量的2倍 slave_parallel_workers = 64 binlog_transaction_dependency_tracking = WRITESET slave_preserve_commit_order = 1 slave_checkpoint_period = 2 #mgr settings #loose-plugin_load_add = 'mysql_clone.so' #loose-plugin_load_add = 'group_replication.so' #loose-group_replication_group_name = "mysql-mgr" #MGR本地节点IPORT,请自行替换 #loose-group_replication_local_address = "172.16.16.10:33061" #MGR集群所有节点IPORT,请自行替换 #loose-group_replication_group_seeds = "172.16.16.10:33061,172.16.16.11:33061,172.16.16.12:33061" #loose-group_replication_start_on_boot = OFF #loose-group_replication_bootstrap_group = OFF #loose-group_replication_exit_state_action = READ_ONLY #loose-group_replication_flow_control_mode = "DISABLED" #loose-group_replication_single_primary_mode = ON #loose-group_replication_majority_after_mode = ON #loose-group_replication_communication_max_message_size = 10M #loose-group_replication_arbitrator = 0 #loose-group_replication_single_primary_fast_mode = 1 #loose-group_replication_request_time_threshold = 100 #loose-group_replication_primary_election_mode = GTID_FIRST #loose-group_replication_unreachable_majority_timeout = 0 #loose-group_replication_member_expel_timeout = 5 #loose-group_replication_autorejoin_tries = 288 #report_host = "172.16.16.10" #innodb settings innodb_buffer_pool_size = 2G innodb_buffer_pool_instances = 8 innodb_data_file_path = ibdata1:12M:autoextend innodb_flush_log_at_trx_commit = 1 innodb_log_buffer_size = 32M innodb_log_file_size = 2G innodb_log_files_in_group = 3 innodb_redo_log_capacity = 6G innodb_max_undo_log_size = 4G # 根据您的服务器IOPS能力适当调整 # 一般配普通SSD盘的话,可以调整到 10000 - 20000 # 配置高端PCIe SSD卡的话,则可以调整的更高,比如 50000 - 80000 innodb_io_capacity = 4000 innodb_io_capacity_max = 20000 innodb_open_files = 65535 innodb_flush_method = O_DIRECT innodb_lru_scan_depth = 4000 innodb_lock_wait_timeout = 10 innodb_rollback_on_timeout = 1 innodb_print_all_deadlocks = 1 innodb_online_alter_log_max_size = 4G innodb_print_ddl_logs = 0 innodb_status_file = 1 #注意: 开启 innodb_status_output & innodb_status_output_locks 后, 可能会导致log_error文件增长较快 innodb_status_output = 0 innodb_status_output_locks = 1 innodb_sort_buffer_size = 67108864 innodb_adaptive_hash_index = 0 #开启NUMA支持 innodb_numa_interleave = ON innodb_print_lock_wait_timeout_info = 1 #自动杀掉超过5分钟不活跃事务,避免行锁被长时间持有 kill_idle_transaction = 300 #innodb monitor settings #innodb_monitor_enable = "module_innodb,module_server,module_dml,module_ddl,module_trx,module_os,module_purge,module_log,module_lock,module_buffer,module_index,module_ibuf_system,module_buffer_page,module_adaptive_hash" #innodb parallel query loose-force_parallel_execute = OFF loose-parallel_default_dop = 8 loose-parallel_max_threads = 96 temptable_max_ram = 8G #pfs settings performance_schema = 1 #performance_schema_instrument = '%memory%=on' performance_schema_instrument = '%lock%=on' 服务文件: [root@mysqln2 ~]# cat /lib/systemd/system/greatsql.service [Unit] Description=GreatSQL Server Documentation=man:mysqld(8) Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html After=network.target After=syslog.target [Install] WantedBy=multi-user.target [Service] # some limits # file size LimitFSIZE=infinity # cpu time LimitCPU=infinity # virtual memory size LimitAS=infinity # open files LimitNOFILE=65535 # processes/threads LimitNPROC=65535 # locked memory LimitMEMLOCK=infinity # total threads (user+kernel) TasksMax=infinity TasksAccounting=false User=mysql Group=mysql #如果是GreatSQL 5.7版本,此处需要改成simple模式,否则可能服务启用异常 #如果是GreatSQL 8.0版本则可以使用notify模式 #Type=simple Type=notify TimeoutSec=0 PermissionsStartOnly=true ExecStartPre=/usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld_pre_systemd ExecStart=/usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-x86_64/bin/mysqld $MYSQLD_OPTS EnvironmentFile=-/etc/sysconfig/mysql Restart=on-failure RestartPreventExitStatus=1 Environment=MYSQLD_PARENT_PID=1 PrivateTmp=false |
yejr
2024-1-29 09:16:37
| ||
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com