MariaDB 安装配置记录
1.集群搭建记录
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 = ROW #bind-address = 192.168.126.129 default_storage_engine = innodb innodb_autoinc_lock_mode = 2 innodb_flush_log_at_trx_commit = 0 innodb_buffer_pool_size = 122M wsrep_provider=/usr/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 #节点N的数据库账户和密码--创建账号密码 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
2.使用记录
查看服务器连接池使用情况:
show global status like 'thread%';
show variables like 'thread_cache_size';
show PROCESSLIST;
查看配置情况:
show variables like "max_connections";
show global variables like 'wait_timeout';
show global variables like 'interactive_timeout';
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)