Difference between revisions of "Live Backups"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 48: Line 48:
  binlog-do-db = mor                                                     
  binlog-do-db = mor                                                     
  server-id=2                                                             
  server-id=2                                                             
  master-host = Masters.ip.address                                          
  master-host = '''Masters.ip.address'''                                         
  master-user = dataslave                                                
  master-user = slave                                                
  master-password = dataslave                                            
  master-password = loyalty                                            
  master-port = 3306                                                     
  master-port = 3306                                                     
  log-bin = /var/lib/mysql/mysql-bin.log
  log-bin = /var/lib/mysql/mysql-bin.log
Line 72: Line 72:
  thread_cache_size = 4
  thread_cache_size = 4
  table_cache = 128
  table_cache = 128
;log-slow-queries = /var/lib/mysql/slow_query.log
  log-error=/var/lib/mysql/mysqld.log
  log-error=/var/lib/mysql/mysqld.log
  [mysql.server]
  [mysql.server]

Revision as of 15:50, 27 March 2009

Masters config file (/etc/my.cnf)

[mysqld]                                                             
datadir=/var/lib/mysql                                               
socket=/var/lib/mysql/mysql.sock                                         
old_passwords=1                                                        
bind-address = 0.0.0.0                                                 
server-id = 1                                                          
binlog-ignore-db="mysql"                                               
log-bin = /var/lib/mysql/mysql-bin.log
log-bin-index = /var/lib/mysql/master-log-bin.index
relay-log = /var/lib/mysql/slave-relay.log
relay-log-index = /var/lib/mysql/slave-relay-log.index
expire-logs-days = 31
sync_binlog = 1
innodb_flush_log_at_trx_commit = 1
innodb_support_xa
max_allowed_packet      = 256M
key_buffer_size=256M
key_buffer=258M
innodb_buffer_pool_size = 100M
query_cache_type=1
query_cache_limit=64M
query_cache_size=64M
join_buffer_size = 2M
tmp_table_size = 512M
max_heap_table_size = 512M
thread_cache_size = 4
table_cache = 128
log-error=/var/lib/mysql/mysqld.log
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
log-error=/var/lib/mysql/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


Slaves configuration file (/etc/my.cnf)

[mysqld]                         
datadir=/var/lib/mysql           
socket=/var/lib/mysql/mysql.sock  
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).       
old_passwords=1                                                        
bind-address = 0.0.0.0                                                 
binlog-do-db = mor                                                     
server-id=2                                                            
master-host = Masters.ip.address                                          
master-user = slave                                                
master-password = loyalty                                            
master-port = 3306                                                     
log-bin = /var/lib/mysql/mysql-bin.log
log-bin-index = /var/lib/mysql/master-log-bin.index
relay-log = /var/lib/mysql/slave-relay.log
relay-log-index = /var/lib/mysql/slave-relay-log.index
expire-logs-days = 31
sync_binlog = 1
innodb_flush_log_at_trx_commit = 1
innodb_support_xa
max_allowed_packet      = 256M
key_buffer_size=256M
key_buffer=258M
innodb_buffer_pool_size = 100M
query_cache_type=1
query_cache_limit=64M
query_cache_size=64M
join_buffer_size = 2M
tmp_table_size = 512M
max_heap_table_size = 512M
thread_cache_size = 4
table_cache = 128
log-error=/var/lib/mysql/mysqld.log
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
log-error=/var/lib/mysql/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid