How to MySQLDump with For Channel to set up multi-source replication?
1
vote
1
answer
1015
views
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 ';
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.
Asked by IGGt
(2276 rep)
Jun 28, 2019, 09:02 AM
Last activity: Jul 2, 2019, 04:23 PM
Last activity: Jul 2, 2019, 04:23 PM