Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids
<<Back to MySQL & MariaDB Main Page
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).
Cause:
The error is caused due to same server_id of Master and Slave hosts
Execute the below command on both Master and Slave to verify the server_id
MariaDB [(none)]> show variables like 'server_id'
-> ;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| server_id | 1 |
+---------------+-------+
1 row in set (0.01 sec)
Solution:
Change the server_id of Slave to 2
MariaDB [(none)]> set global server_id=2
Also enter the value in server.conf or my.cnf to make the change persistent across the server restart
About server_id Variable
Description: Used to identify master and slave servers in replication. The server_id must be unique for each server in the replicating group. If left at 0, the default until MariaDB 10.2.1, a slave will not connect to a master, and a master will refuse all slave connections.
Commandline: --server-id =#
Scope: Global, Session (>= MariaDB 10.0.2 only - see Global Transaction ID)
Dynamic: Yes
Data Type: numeric
Default Value: 1 (>= MariaDB 10.2.2), 0 (<= MariaDB 10.2.1)
Range: 1 to 4294967295 (>= MariaDB 10.2.2), 0 to 4294967295 (<= MariaDB 10.2.1)
Commandline: --server-id =#
Scope: Global, Session (>= MariaDB 10.0.2 only - see Global Transaction ID)
Dynamic: Yes
Data Type: numeric
Default Value: 1 (>= MariaDB 10.2.2), 0 (<= MariaDB 10.2.1)
Range: 1 to 4294967295 (>= MariaDB 10.2.2), 0 to 4294967295 (<= MariaDB 10.2.1)
Comments
Post a Comment