配置Mysql主从服务实现实例 ### 配置主数据库 my.cnf server-id=1 log-bin=master-bin log-bin-index=master-bin.index ### 在主数据库上创建同步账号 create user backup; GRANT REPLICATION SLAVE ON *.* TO 'backup'@'192.168.%.%' IDENTIFIED BY 'mysql'; ### 配置从数据库 my.cnf server-id=2 relay-log-index=slave-relay-bin.index relay- lo