--清空日志
flush logs;
reset master; reset slave;
查询服务器ID
show variables like 'ser%';
配置主从服务器:
主服务器 my.ini
log-bin=mysql-bin
从服务器:
change master to
master_host='192.168.80.40',
master_user='root',
master_password='root',
master_port=3306,
master_log_file='mysql-bin.000002',
master_log_pos=1372,
master_connect_retry=60;
相关启动配置命令
stop SLAVE
START slave
show SLAVE STATUS
联合更新:
UPDATE items,month SET items.price=month.price
WHERE items.id=month.id;