1

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.';

2 Answers 2

1

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.

0

You must have a different value in the my.cnf on each server in a replication setup. server_id must be different on each machine, else replication will be trying to go in a loop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.