MySQL 5.1 Replication

To configure data replication between 2 MySQL system, we can follow MySQL 5.1 Replication HOWTO document. If the master system is a current production database system, we should stop and copy database files on /var/lib/mysql to new system, and follow documentation to modify the MySQL config files.

[mysqld]
log-bin=mysql-bin
server-id=1

For InnoDB:
[mysqld]
sync_binlog=1
[innodb]
innodb_flush_log_at_trx_commit=1

On the slave system, we can follow slave base config documentation to do the configuration, and restore database files copied from existing system to local /var/lib/mysql/ directory.

[mysqld]
server-id=2