HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

What does this error mean "A slave with the same server_uuid/server_id as this slave has connected to the master;"?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thisserver_idsameerrorthewhatwithslavemeanhas

Problem

Upon searching for this, the main cause of this error is usually when using snapshots or cloning the machine. But I did not do this. I perform mysqldump --master-data=2 on the master then restore the dump on my slave server. Then start the slave on the position indicated on the outfile.

Any idea on what caused this? I am running a multi-source replica and this error is from just 1 source.

here is the complete error:

Got fatal error 1236 FROM MASTER WHEN reading DATA FROM BINARY LOG: 'A slave with the same server_uuid/server_id as this slave has connected to the master; the first event 'VM1-bin.000006' at 641809774, the last event read from '/binlogdata/VM1-bin.000009' at 146836375, the last byte read from '/binlogdata/VM1-bin.000009' at 146836375.';

Solution

Even if you server_id is different you may need to change the server_uuid which you can do manually in my.cnf or by deleting $datadir/auto.cnf, this file is created by MySQL when it stats and includes the server uuid.

So stop MySQL, remove the file, and start MySQL again.

Context

StackExchange Database Administrators Q#285075, answer score: 2

Revisions (0)

No revisions yet.