Mysql

MariaDB Galera 集群

  • April 23, 2015

我正在嘗試在集群中設置 MariaDB,但看起來我遇到了這個錯誤:

#mysqld -u mysql
130407 21:36:24 InnoDB: The InnoDB memory heap is disabled
130407 21:36:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130407 21:36:24 InnoDB: Compressed tables use zlib 1.2.7
130407 21:36:25 InnoDB: Initializing buffer pool, size = 2.0G
130407 21:36:26 InnoDB: Completed initialization of buffer pool
130407 21:36:27 InnoDB: highest supported file format is Barracuda.
130407 21:36:29  InnoDB: Waiting for the background threads to start
130407 21:36:30 Percona XtraDB (http://www.percona.com) 5.5.30-MariaDB-30.1 started; log      sequence number 757767234118
130407 21:36:30 [ERROR] mysqld: unknown variable 'wsrep_provider=/usr/lib/libgalera_smm.so'
130407 21:36:30 [ERROR] Aborting

130407 21:36:30  InnoDB: Starting shutdown...
130407 21:36:31  InnoDB: Shutdown completed; log sequence number 757767234118
130407 21:36:31 [Note] mysqld: Shutdown complete 

無論如何,無論我首先使用 wsrep 在 my.cfg 中設置什麼設置,我都會收到此錯誤任何想法有什麼問題嗎?

這是我的配置:

[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
[mysqld]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
default_storage_engine  = InnoDB
log-bin=mysql-bin
binlog_format=ROW
server-id       = 510
sync_binlog=1
default-time-zone='US/Eastern'
log-slave-updates = 1
wsrep_provider = /usr/lib/libgalera_smm.so
wsrep_cluster_address = gcomm://
wsrep_retry_autocommit = 0
wsrep_sst_method = rsync
wsrep_sst_auth=sst:sstpasswd
innodb_file_per_table
innodb_open_files = 2048
innodb_data_home_dir = /var/lib/mysql
innodb_data_file_path = ibdata1:2000M;ibdata2:2000M;ibdata3:100M:autoextend
innodb_log_group_home_dir = /var/lib/mysql/mysql_logs/
innodb_buffer_pool_size = 2048M
innodb_additional_mem_pool_size = 512M
innodb_log_file_size = 1536M
innodb_log_buffer_size = 50M
innodb_flush_log_at_trx_commit = 0
innodb_lock_wait_timeout = 50
innodb_flush_method = O_DIRECT
innodb_write_io_threads = 32
innodb_read_io_threads = 32
innodb_thread_concurrency = 16
innodb_support_xa = false
innodb_autoinc_lock_mode=2
innodb_doublewrite=0

那麼我缺少此設置的哪個步驟。作業系統 Arch Linux

#pacman -Q | grep galera
galera 23.2.2-2
#whereis libgalera_smm.so
libgalera_smm: /lib/libgalera_smm.so /usr/lib/libgalera_smm.so /lib64/libgalera_smm.so /usr/lib64/libgalera_smm.so

#mysqld -u mysql
130407 22:12:20 InnoDB: The InnoDB memory heap is disabled
130407 22:12:20 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130407 22:12:20 InnoDB: Compressed tables use zlib 1.2.7
130407 22:12:20 InnoDB: Initializing buffer pool, size = 2.0G
130407 22:12:20 InnoDB: Completed initialization of buffer pool
130407 22:12:20 InnoDB: highest supported file format is Barracuda.
130407 22:12:20  InnoDB: Waiting for the background threads to start
130407 22:12:21 Percona XtraDB (http://www.percona.com) 5.5.30-MariaDB-30.1 started; log    sequence number 761369976882
130407 22:12:21 [ERROR] mysqld: unknown variable 'wsrep_provider=/usr/lib/libgalera_smm.so'
130407 22:12:21 [ERROR] Aborting

130407 22:12:21  InnoDB: Starting shutdown...
130407 22:12:22  InnoDB: Shutdown completed; log sequence number 761369976882
130407 22:12:22 [Note] mysqld: Shutdown complete

???謝謝幫助

我解決了這個問題,當我降級到 4.2 時,gcc 版本 4.7.2 (GCC) 存在一些錯誤,一切正常,如果我使用 galera 的通用包也一切正常

我看到你有錯誤輸出告訴你的那一行,但如果這是在 64 位系統上,你必須為它找到合適的位置。如果使用 find 命令:

find / -name '*galera*'

您應該會在某處看到類似於 libgalera_smm.so 的內容。我的在/usr/lib64/libgalera_smm.so.

引用自:https://serverfault.com/questions/497082