`

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


分享到:
评论

相关推荐

    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主从同步复制错误解决一例

    当主从服务器的Server ID相同,就会出现"Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids"这样的错误,这是由于MySQL的复制机制要求主从服务器的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

    代码如下: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-...

    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

    mysql数据库 slave复制异常问题解决办法.docx

    Got fatal error 1236 from master when reading data from binary log: ‘Client requested master to start replication from position > file size; the first event ‘mysql-bin.000342’ at 1028687822, the ...

    mysql5.6-5.5主从备份

    在配置过程中,如果遇到`Slave_IO_Running`为`NO`,并且报错`Got fatal error 1236 from master when reading data from binary log`,这通常意味着从服务器无法处理主服务器上的某些事件。可能的原因包括版本不兼容...

    Linux下安装mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz

    2016-08-30 15:56:49 1990 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists! ``` 在确认了`mysql`用户之后,可以在该用户下创建`data`目录,并解压MySQL安装包: ...

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

    1. **错误识别**:在描述中提到的错误`Last_IO_Error: Got fatal error 1236 from master when reading data from binary log...`通常表示从库在尝试读取主库的二进制日志时遇到了问题,可能是由于日志文件丢失或者...

    配置Mysql主从服务实现实例

    如果复制过程中出现这样的错误信息:"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.",就需要检查每...

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

    如果相同,复制进程会报错并停止,提示“Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids”。解决方法是简单地为从服务器分配一个不同的`server-id`。 3. **复制...

Global site tag (gtag.js) - Google Analytics