Quantcast
Channel: MySQL Forums - Utilities
Viewing all articles
Browse latest Browse all 380

innodb_flush_log_at_trx_commit=1 for Slave? (5 replies)

$
0
0
Hello,

I am trying to come up with a solution for automated failover in a master-slave replication architecture. I have set up 1 Master, and 2 Slaves.

A portion of my.cnf for Master is as follows:

replicate-do-db=<db name>
binlog-do-db=<db name>

# To avoid log file inconsistency
innodb_flush_log_at_trx_commit=1
sync_binlog=1

A portion of my.cnf on Slave is as follows:

replicate-do-db=<db name>
binlog-do-db=<db name>

log-bin=mysql-bin
relay-log=mysql-relay-bin

As per this: http://dev.mysql.com/doc/refman/5.0/en/replication-solutions-switch.html, I can promote a Slave to become as Master by using 'CHANGE MASTER TO' command, without specifying master log file and position, such that it can takes default values.

What I'd like to know is, can I add the following
innodb_flush_log_at_trx_commit=1
sync_binlog=1

to my.cnf of Slave so that when it becomes Master, it can too avoid log file inconsistency?

Also, I'm aware of tools like Tungsten that do automatic failover in case Master goes down, but I'd like to give a try myself. If anyone else has ventured into this and has any comment or feedback to provide, I'd much appreciate it.

Thanks,
Trupti

Viewing all articles
Browse latest Browse all 380

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>