The mysqldump client utility performs logical backups, producing a set of SQL statements that can be executed to reproduce the original database object definitions and table data. It dumps one or more MySQL databases for backup or transfer to another…
一.主mysql配置:1.配置my.cnf[mysqld]server-id = 10 #服务器标示log-bin= mysql-bin #二进制日志binlog-do-db=mydb #需要同步的数据库 配置完成后重启 2.建立复制账号:grant all privileges on *.* to 'rep'@'192.168.1.xx' identified by '12345678'; 3.锁定数据库表,导出数据flush tables with read lock; 新开一个终端导出数据…