RPM安装最新版本在AnolisOS上,作为单机模式使用。以my.cnf配置初始化后,配置mysqld启动服务。服务器会间隔2分钟会重启一次,不知道是my.cnf哪里配置错误,或者需要关闭什么参数?
2025-07-15T06:54:05.261091Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.32-X-Cluster-8.4.19-20241112).
2025-07-15T06:54:05.493728Z 0 [System] [MY-025030] [XPaxos] stop consensus_commit_pos_watcher thread
2025-07-15T06:54:07.389992Z 0 [System] [MY-010910] [Server] /u01/xcluster80/bin/mysqld: Shutdown complete (mysqld 8.0.32-X-Cluster-8.4.19-20241112) Source distribution.
2025-07-15T06:54:07.419571Z mysqld_safe mysqld from pid file /var/lib/mysql/mysqld.pid ended
2025-07-15T06:54:07.979012Z mysqld_safe Logging to '/var/log/mysqld_error.log'.
2025-07-15T06:54:08.003382Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2025-07-15T06:54:08.016915Z 0 [System] [MY-025030] [XPaxos] XPaxos server start.
2025-07-15T06:54:08.167771Z 0 [System] [MY-010116] [Server] /u01/xcluster80/bin/mysqld (mysqld 8.0.32-X-Cluster-8.4.19-20241112) starting as process 95754
2025-07-15T06:54:08.204884Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2025-07-15T06:54:08.397667Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2025-07-15T06:54:08.743752Z 0 [System] [MY-025031] [XPaxos] [Recovery] Consensus_binlog_recovery::recover end , file_size 939, curr_position 939, m_current_index 8, m_start_pos 916, m_end_p os 939, m_valid_pos 939, m_valid_index 8, m_is_malformed 0, m_in_transaction 0, m_failure_message , get_error_type 1, get_error_number 0, get_error_message
2025-07-15T06:54:08.743795Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2025-07-15T06:54:08.746737Z 0 [System] [MY-013911] [Server] Crash recovery finished in binlog engine. No attempts to commit, rollback or prepare any transactions.
2025-07-15T06:54:08.746835Z 0 [System] [MY-013911] [Server] Crash recovery finished in InnoDB engine. No attempts to commit, rollback or prepare any transactions.
2025-07-15T06:54:08.746856Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2025-07-15T06:54:08.755069Z 0 [Warning] [MY-010604] [Repl] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his h ostname changed!! Please use '--relay-log=mdtest03-relay-bin' to avoid this problem.
2025-07-15T06:54:17.610072Z 0 [System] [MY-025036] [XPaxos] [Proto] Server 1 : Paxos state change from FOLL to CAND !!
2025-07-15T06:54:17.612273Z 0 [System] [MY-025036] [XPaxos] [Proto] Server 1 : Start new requestVote: new term(10)
2025-07-15T06:54:17.612322Z 0 [System] [MY-025036] [XPaxos] [Proto] Server 1 : Paxos state change from CAND to LEDR !!
2025-07-15T06:54:17.612393Z 0 [System] [MY-025036] [XPaxos] [Proto] Server 1 : become Leader (currentTerm 10, lli:9, llt:10)!!
2025-07-15T06:54:17.612610Z 0 [System] [MY-025031] [XPaxos] [Recovery] wait_commit_index_in_recovery begin, current commitIndex 9
2025-07-15T06:54:17.612639Z 0 [System] [MY-025031] [XPaxos] [Recovery] Found max consensus index from pending_recovering_trxs, current commitIndex 9, max_consensus_index 0
2025-07-15T06:54:17.612652Z 0 [System] [MY-025031] [XPaxos] [Recovery] wait_commit_index_in_recovery end, recover_status 1, start_apply_index 8, current commitIndex 9, last_leader_term_inde x 8
2025-07-15T06:54:17.615204Z 0 [System] [MY-025030] [XPaxos] start consensus_commit_pos_watcher thread
2025-07-15T06:54:17.649054Z 0 [Warning] [MY-013829] [Server] Missing data directory for ICU regular expressions: /u01/xcluster80__current/lib/private/.
2025-07-15T06:54:17.649184Z 0 [System] [MY-025022] [Server] Gtid_in_table :
2025-07-15T06:54:17.649931Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2025-07-15T06:54:17.649970Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2025-07-15T06:54:17.671820Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /tmp/mysqlx.sock
2025-07-15T06:54:17.671893Z 0 [System] [MY-000000] [Server] /u01/xcluster80/bin/mysqld is using 'bundled jemalloc' Malloc Library.
2025-07-15T06:54:17.671908Z 0 [System] [MY-010931] [Server] /u01/xcluster80/bin/mysqld: ready for connections. Version: '8.0.32-X-Cluster-8.4.19-20241112' socket: '/var/lib/mysql/mysql.soc k' port: 3306 Source distribution.
2025-07-15T06:54:17.672297Z 0 [System] [MY-025030] [XPaxos] ConsensusLogManager::wait_follower_upgraded, consensus term: 10, consensus index: 0
2025-07-15T06:54:17.677882Z 6 [System] [MY-025034] [XPaxos] [Applier] Apply thread start, recover status = 1, start apply index = 8, rli consensus index 7, consensus_ptr CommitIndex 9
2025-07-15T06:54:17.678067Z 6 [System] [MY-025030] [XPaxos] get_next_trx_index, input index: 8, next transaction index is 9
2025-07-15T06:54:17.678100Z 6 [System] [MY-025034] [XPaxos] [Applier] Apply thread group relay log file name = './mysql-binlog.000001', pos = 939', next_index = 9, rli apply index = 8
2025-07-15T06:54:17.679739Z 6 [System] [MY-025034] [XPaxos] [Applier] mts_init_consensus_apply_index 8
2025-07-15T06:54:17.679790Z 6 [System] [MY-025034] [XPaxos] [Applier] Apply thread stop, opt_consensus_leader_stop_apply: false, seconds_behind_master: 1752562457, consensus_leader_stop_app ly_time: 0, consensus_stop_apply_index: 0
2025-07-15T06:54:17.679811Z 6 [System] [MY-025034] [XPaxos] [Applier] Apply thread catchup commit index, consensus index: 8, current term: 9, apply term: 10, stop term: 10
2025-07-15T06:54:17.685434Z 0 [System] [MY-025030] [XPaxos] ConsensusLogManager::wait_follower_upgraded finish, error 0
[mysqld]
#base config
user = mysql
port = 3306
basedir = /u01/xcluster80
datadir = /var/lib/mysql
tmpdir = /tmp
socket = /var/lib/mysql/mysql.sock
pid-file=/var/lib/mysql/mysqld.pid
# disable Cluster mode
disabled_storage_engines = "XPaxos"
#loose-xpaxos-enabled = OFF
#polarx_enable_cluster = OFF
#loose_skip_xpaxos = ON
loose-skip-polarx-rpc = ON
loose-plugin-load = ""
# log config
log_error_verbosity = 2
log_error = /var/log/mysqld_error.log
#slow_query_log = 1
#slow_query_log_file = /var/log/mysql-slow.log
#long_query_time = 2
#log_queries_not_using_indexes = 1
max_connect_errors=4294967295
#binlog config
server_id = 1
cluster_id = 1234
cluster_info = 127.0.0.1:14886@1
log_bin = mysql-binlog
binlog_format = row
binlog_row_image = FULL
binlog_expire_logs_seconds = 604800
binlog_cache_size = 1M
max_binlog_size = 1G
sync_binlog = 1
# InnoDB config
innodb_buffer_pool_size = 4G
innodb_redo_log_capacity = 1G
authentication_policy = mysql_native_password
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
explicit_defaults_for_timestamp=true
key_buffer_size = 384M
max_allowed_packet = 512M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
[Unit]
Description=PolarDB-X Database Service
After=network.target
After=syslog.target
[Service]
Type=notify
User=mysql
Group=mysql
ExecStart=/u01/xcluster80/bin/mysqld_safe --defaults-file=/etc/my.cnf
#Restart=on-failure
#RestartSec=5s
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
PolarDB 分布式版 (PolarDB for Xscale,简称“PolarDB-X”) 采用 Shared-nothing 与存储计算分离架构,支持水平扩展、分布式事务、混合负载等能力,100%兼容MySQL。 2021年开源,开源历程及更多信息访问:OpenPolarDB.com/about