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:


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

  • mysqldump happens on the Master. Defining "channels" happens on the Slave. I'm confused about what steps you are taking.
    – Rick James
    Commented Jun 28, 2019 at 15:19
  • If you look at the queries executed by the mysqldump output, one of the first ones is change master to master_host = . . . . I was looking for a way to get mysqldump to include a channel name as part of this query,
    – IGGt
    Commented Jul 2, 2019 at 9:37

1 Answer 1


I raised this with Oracle BUG 96072, and they have responded with

"I have analysed it and I consider it a welcome feature request."

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:

  • Export MySQLdump to a file, then manually edit the file, before importing it again (needs twice the space and twice the time)
  • Import the first database, remove the replication settings (saving for later), import the second database. Update the replication settings for the second one, then start replication on the first one. Also far from an ideal situation.
  • I see that the latest entry in the Bug is "This feature will of course require one more option in mysqldump."
    – Rick James
    Commented Jul 2, 2019 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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