手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

MySQL 5.5双机热备份 master-master

[日期:2013-03-11] 来源:Linux社区  作者:Linux [字体:大 中 小]
四,master-B的配置文件
 
[client]
 
default-character-set = utf8
 
port=3306
 
socket = /tmp/MySQL.sock
 
[mysqld]
 
user = mysql
 
port=3306
 
socket = /tmp/mysql.sock
 
basedir = /usr/local/mysql
 
datadir=/data/mysql/data
 
pid-file = /data/mysql/mysql.pid
 
#bind-address=121.14.58.238
 
log-error = /data/mysql/mysql-error.log
 
#max_connections=1000
 
log_slave_update =1
 
log-bin = /data/mysql/binlog/mysql-bin
 
log-bin-index = /data/mysql/binlog/mysql-bin.index
 
binlog_format = mixed
 
binlog_cache_size = 4M
 
max_binlog_cache_size = 8M
 
max_binlog_size = 1G
 
expire_logs_days = 30
 
binlog-do-db=test
 
binlog-ignore-db=mysql
 
replicate-do-db=test
 
replicate-ignore-db=mysql
 
log-slave-updates
 
slave-skip-errors=all
 
sync_binlog=1
 
auto_increment_increment=2
 
auto_increment_offset=2
 
key_buffer_size = 384M
 
sort_buffer_size = 2M
 
read_buffer_size = 2M
 
read_rnd_buffer_size =16M
 
join_buffer_size =2M
 
thread_cache_size = 300
 
query_cache_limit = 2M
 
query_cache_min_res_unit =2K
 
thread_concurrency = 8
 
table_cache =614
 
table_open_cache = 512
 
open_files_limit = 10240
 
back_log = 600
 
max_connections = 5000
 
max_connect_errors = 6000
 
external-locking = FALSE
 
max_allowed_packet =16M
 
default_storage_engine = MyISAM
 
#default_storage_engine = InnoDB
 
thread_stack =192K
 
transaction_isolation = REPEATABLE-READ
 
tmp_table_size = 256M
 
max_heap_table_size =512M
 
bulk_insert_buffer_size = 64M
 
myisam_sort_buffer_size = 64M
 
myisam_max_sort_file_size = 10G
 
myisam_repair_threads = 1
 
myisam_recover
 
long_query_time = 2
 
slow_query_log  = on
 
slow_query_log_file = /data/mysql/slow.log
 
log-queries-not-using-indexes =on
 
log-slow-admin-statements
 
skip-name-resolve
 
skip-external_locking
 
log_bin_trust_function_creators=1
 
#skip-networking
 
#skip-innodb
 
innodb_additional_mem_pool_size = 16M
 
innodb_buffer_pool_size = 512M
 
innodb_data_file_path = ibdata1:256M:autoextend
 
innodb_file_io_threads = 4
 
innodb_thread_concurrency = 8
 
innodb_flush_log_at_trx_commit =2
 
innodb_log_file_size =128M
 
innodb_log_files_in_group = 3
 
innodb_max_dirty_pages_pct = 90
 
innodb_lock_wait_timeout =240
 
innodb_file_per_table = 0
 
innodb_status_file = 1
 
interactive_timeout=120
 
wait_timeout=120
 
server-id=2
 
[mysqldump]
 
quick
 
max_allowed_packet = 64M
 
[mysql]
 
no-auto-rehash
 
[myisamchk]
 
key_buffer_size = 256M
 
sort_buffer_size = 256M
 
read_buffer = 2M
 
write_buffer = 2Mlinux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款