Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
mysql> show variables like 'server_id'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | server_id | 1 | +---------------+-------+ 1 row in set (0.00 sec)
发现,mysql并没有从my.cnf文件中更新server_id,既然这样就只能手动修改了
复制代码 代码如下:
mysql> set global server_id=2; #此处的数值和my.cnf里设置的一样就行 mysql> slave start;
mysql 队列 实现并发读深入mysql并发插入优化详解MySQL主从复制的原理及配置方法(比较详细)mysql中复制表结构的方法小结MySQL复制表结构和内容到另一张表中的SQL语句MySQL的主从复制步骤详解及常见错误解决方法MySQL的隐式类型转换整理总结MySQL隐式类型的转换陷阱和规则MySQL 5.7并发复制隐式bug实例分析