首页 > 代码库 > mysql中做主从复制时的错误
mysql中做主从复制时的错误
1.mysql主从配置 Slave I/O: Fatal error: The slave I/O thread stops 2013-10-09 12:37:33
分类: LINUX
Slave I/O: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work. Error_code: 1593
按照网上的教程来做主从同步
结果复制的时候 我把整个data文件夹一起复制过去了
导致了 data/auto.cnf 文件一样
anco.cnf里面记录的server-id也一样 把从服务器的data/auto.cnf删除 重启服务 同步成功
2.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).
查看server-id
mysql> show variables like ‘server_id‘;
手动修改server-id
mysql> set global server_id=2; #此处的数值和my.cnf里设置的一样就行
mysql> slave start;
同时需要删除安装在/usr/local/mysql下的my.cnf删除。
mysql中做主从复制时的错误