Server slave, replication
I have a secondary server (slave), where it only receives replication from the Main. If I leave my.cnf settings like this: innodb_flush_log_at_trx_commit = 2 and SQL_LOG_BIN = 0 ; I miss something. Since I don't need the logbinary, because the slave is just a copy and I don't use it for other purposes?
Replication requires several things to be set.
log_bin -- to say that replication is turned on log_slave_updates -- turn it on innodb_flush_log_at_trx_commit -- not not directly relevant to replication SQL_LOG_BIN -- 0 says not to replicate subsequent writes in this connection plus all that is set up by CHANGE MASTER
The intent of a Replica is to always have a full copy of the Primary. Is that your goal? Or maybe "take a snapshot of the Primary, but no keep it updated.
If you don't need the Replica to be kept up to date, then here are some idea on capturing an occasional snapshot:
- LVM -- best for least impact.
mysqlto load on the target server -- straightforward, but invasive.
- Use replication even if you don't need the rest of the repl benefits.
- stop both servers; copy the disk over