We run your basic Master + Multi-slave mysql replication setup.

We would like to lower the MASTER_CONNECT_RETRY parameter on each of our slaves.

Is there anything beyond re-executing CHANGE MASTER TO ... on each of our slaves with the new connect_retry paramater (and of course MASTER_HOST, MASTER_USERNAME, etc etc, which will be the same) that we need to keep in mind?

As mentioned, this is an already running replication setup. All that we want to do is lower the MASTER_CONNECT_RETRY time.


1 Answer 1


The number of times that the slave tries to connect to the master before giving up. Reconnects are attempted at intervals set by the --master-connect-retry option (or the MASTER_CONNECT_RETRY option of the CHANGE MASTER TO statement) and reconnects are triggered when data reads by the slave time out according to the --slave-net-timeout option. The default value is 86400. A value of 0 means “infinite”; the slave attempts to connect forever.

Slave-net-timeout --> The number of seconds to wait for more data from the master before the slave considers the connection broken, aborts the read, and tries to reconnect. The first retry occurs immediately after the timeout. The interval between retries is controlled by the CHANGE MASTER TO statement or --master-connect-retry option and the number of reconnection attempts is limited by the --master-retry-count option. The default is 3600 seconds (one hour).

So in conclusion you have to follow these steps in all slaves:

stop slave;
MASTER_USER = 'user',
MASTER_PASSWORD = 'password',
MASTER_LOG_FILE = 'filename',
start slave;

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.