MariaDB installation configuration record

 iptables --append INPUT --protocol tcp \
      --source 192.168.126.129 --jump ACCEPT
 iptables --apend INPUT --protocol tcp \
      --source 192.168.126.130 --jump ACCEPT
 iptables --append INPUT --protocol tcp \
      --source 192.168.126.131 --jump ACCEPT
      
  
    
  iptables-save> /etc/sysconfig/iptables-config
      

grant usage on *.* to sst@'%' identified by 'ssTT-488';
flush privileges;

修改后

[mysqld]
binlog_format the ROW =
# the bind-address = 192.168.126.129
default_storage_engine = InnoDB
innodb_autoinc_lock_mode = 2
the innodb_flush_log_at_trx_commit = 0
innodb_buffer_pool_size = 122M
wsrep_provider = / usr / the lib64 / Galera / libgalera_smm.so
wsrep_provider_options = "gcache.size = 300M; gcache.page_size 300M = "
wsrep_cluster_name =" MyCluster "
wsrep_cluster_address =" Gcomm: //192.168.126.129 "
wsrep_sst_method = rsync
wsrep_node_name = node11
wsrep_node_address =" 192.168.126.129 "
wsrep_sst_auth = SST: SSTT-488     # node N database account and password - create account password
wsrep_on = ON

 

[mysql_safe]
log-error = /var/log/mysqld.log
pid-file = /var/run/mysqld/mysqld.pid

swapon --summary

fallocate -l 512M /swapfile
dd if=/dev/zero of=/swapfile bs=1M count=512
chmod 600 /swapfile
ls -a / | grep swapfile
mkswap /swapfile
swapon /swapfile
vi /etc/fstab
/swapfile none swap defaults 0 0
 
swapon --summary


galera_new_cluster


show variables like 'character%';
set character_set_server = utf8;
set character_set_database = utf8;

cp /usr/share/mysql/wsrep.cnf /etc/my.cnf.d/
vi /etc/my.cnf.d/wsrep.cnf


garbd -a gcomm://192.168.126.129 -g MyCluster -d

journalctl -xe





Guess you like

Origin www.cnblogs.com/leolzi/p/11103774.html