Test environment. Basically the data is instantaneous sync, hope to be helpful to everybody
RedHat ES 3 Update 3
MYSQL 5.0.15
MySQL data synchronization backup
A server: 192.168.1.2 Master server Master
B Server: 192.168.1.3 Vice Server slave
A server settings
#mysql –u root–p
Mysql>grant FILE on *.* to backup@192.168.1.3 identified by ' 1234 ';
Mysql>exit
Above is master open an account backup password 1234 give ip:192.168.1.3 the right to file processing
Mysqladmin–u root–p shutdown
Exporting Master's database to a slave machine, you can choose to export a database that needs to be synchronized
Modify the/ETC/MY.CNF on a machine
Add parameters to [mysqld] section
Log-bin=mysql-bin
Server-id=1
binlog_do_db = Gbbbs (database to synchronize)
binlog_ignore_db = Mysql,test,information_schema (libraries that do not need to be synchronized, 5.0 have information_schema this library)
Sql-bin-update-same
Reboot a server MySQL
b Server Settings
Set/ETC/MY.CNF
Join in [mysqld] section
Server-id = 2 (if there are slave users, their IDs will also increase, such as server-id=3)
Master-host = 192.168.112.71
Master-user = Backup
Master-password = 1234
Replicate-do-db = Gbbbs
#replicate-do-db = Database2
Log-warnings
master-port=3306
Master-connect-retry = 60
Restart MySQL for Server B
There are master.info files in the database folder to view the sync information
is actually MySQL Replication
Current 1/3 page
123 Next read the full text