I'm trying to set up multi-source replication.
But, when I try and import the second database I get the error:
ERROR 3079 (HY000) at line 28: Multiple channels exist on the slave. Please provide channel name as an argument.
How can I supply the channel name to mysqldump
I run the command:
mysqldump -h1.2.3.4 -P3306 -umysqldumpuser -ppassword --dump-slave --apply-slave-statements --include-master-host-port --single-transaction --databases db_name -E -R -q -c --max_allowed_packet=2G | mysql -S/var/run/mysqld/mysqld.sock -umysqldumpuser -ppassword
The first dump is fine, as I can then run:
RESET SLAVE ALL FOR CHANNEL "";
CHANGE MASTER TO
. . .
FOR CHANNEL '<channel_name>;
So it is now replicating over a channel. But I can't dump the second one as it gives me the above error.
The only way I can see this working, would be to dump the first one, stop replication, make a note of the logfile
and pos
, and then wipe the slave connection, leaving replication to the first database off while I dump the second one.
Only then can I start replication to both databases at the same time.
This is highly impractical, especially if you are looking to combine connections from numerous locations.
I have searched the documents, but can't find any reference to using mysqldump and channels.
Best Answer
I raised this with Oracle BUG 96072, and they have responded with
So I am taking it from that, that this is an oversight, and there is currently no option to use mysqldump to build a multi-source database.
So for the moment it seems the options are: