I have a MySQL server (Serv-B) that acts as a Slave from a Master server (Serv-A). This has been configured and is working perfectly fine (the replication has been checked to work).
Now, I'd like this "slave" server to also become the master to another slave server (Serv-C). For that, I do the same commands as for setting up the initial configuration :
I connect to the MySQL server Serv-B, and call the following commands :
FLUSH TABLES WITH READ LOCK; SHOW MASTER STATUS;
On another terminal, I run the mysqldump
command :
mysqldump -u root mydb > /home/cx42/mydb.sql
But it hangs. It hangs until I either close the MySQL terminal, or stop the "Flush" command with UNLOCK TABLES;
As soon as I unlock the tables, the mysqldump commands finish in a few seconds.
It seems that the FLUSH
command is locking my tables in a way that mysqldump can't access them, but I don't know what is causing this.
The Serv-B server (the one I'm calling "FLUSH ..") has the following configuration :
server-id = 10
log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 7
max_binlog_size = 100M
binlog_do_db = mydb
log_slave_updates = 1
relay-log = /var/log/mysql/mysql-relay-bin.log
What is wrong ?