`

mysql Slave I/O: Fatal error

阅读更多
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

解决方法:先看这一段:

To give some background first, starting in MySQL 5.6, the server generates a true UUID in addition to the –server-id supplied by the user. This is ultimately to help with new replication features.

From a under-the-hood view, when starting, the MySQL server automatically obtains a UUID as follows (per the manual):

Attempt to read and use the UUID written in the file data_dir/auto.cnf (where data_dir is the server’s data directory); exit on success.
Otherwise, generate a new UUID and save it to this file, creating the file if necessary.
First, this means there is a new file (in 5.6+) located in the datadir named auto.cnf. In this file is a unique uuid for the server.

This is great, but if you are unaware of it, and simply copy the datadir to set up a slave, and do not remove this file, then you’re in for some errors. So just be cautious/aware of this. Some of these errors are easier to track down, such as in this case, a master and slave with the same uuid throws an error right away in the SHOW SLAVE STATUS and the error log. However, if your master is different from the slave, but you have 2 slaves with the same uuid, you’re in for trouble, and the errors are not very descriptive. [More on this soon, once I can test it a bit more, but I saw some strange behaviors in my first tests.]

So, to fix it, simply delete the auto.cnf file, and restart that instance. A new auto.cnf file / and uuid will be generated. For reference, you’d see something like the following in your error log:


so,to fix it:

删掉默认目录/data下 auto.cnf
然后重启 mysql 使其自动重新生成 uuid

按照其他正常步骤设置 slave 启动,问题fixed 掉,注意uuid 并不是 server-id ,二者有本质区别;


Relay_Master_Log_File: mysql-bin.000014
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes

  1.Last_Error: Column 3 of table 'juxinli_credit.sys_user' cannot be converted from type 'varchar(90)' to type 'varchar(10)'


2. Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'

my.cnf 配置log-bin/log-bin-index

3.Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'

stop slave-->reset slave -->start slave -->问题解决;

3.数据不同步实时更新;show slave status\G 确定你的master 是正确的。并且两个IO running 都是yes


分享到:
评论

相关推荐

    mysql主从同步复制错误解决一例

    Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids

    master and slave have equal MySQL server UUIDs 解决方法

    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. 首先检查:mysql> show variables like ‘server_id...

    MySQL-Master_Slave_repl.txt

    Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs This error generally occur when we clone the master to slaver. Delete auto.cnf of mysql, and then ...

    InnoDB引擎数据库主从复制同步心得

    1)MySQL的replication过程是一个异步同步的过程,并非完全的...  Fatal error: The slave I/O thread stops because master and slavehave equal MySQL server ids; these ids must be different for replication to

    master and slave have equal MySQL server ids

    Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids

    mysql主从库不同步问题解决方法

    Got fatal error 1236 from master when reading data from binary log: ‘Could not find first log file name in binary log index file’”等或由于清数据导致主从库不同步了,解决办法如下: 先进入slave中执行...

    Mysql主从同步Last_IO_Errno:1236错误解决方法

    Mysql主从同步的Last_IO_Errno:1236...Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configur

    InnoDB引擎数据库主从复制同步新的分享

    近期将公司的MySQL架构升级了,由原先的一主多从换成了DRBD+Heartbeat双主多从,正好手上... 2)MySQL的master与slave机器记得server-id要保持不一致,如果一样的话,replication过程中会出现如下报错: Fatal error: Th

Global site tag (gtag.js) - Google Analytics