patternsqlMinor
Rebooting a MySQL Replication Slave
Viewed 0 times
slavemysqlreplicationrebooting
Problem
For the first time since it was set up I need to reboot a read-only MySQL replication slave.
I found this article about downing a slave for maintenance (albeit he's just describing stopping the
How to Safetly[sic] Restart Your MySQL Slave Server
In summary the procedure is:
In
From OS:
I would reboot at this point and then after the system has booted:
In
Does this look about right? Is there anything else I should be doing?
I found this article about downing a slave for maintenance (albeit he's just describing stopping the
mysql daemon):How to Safetly[sic] Restart Your MySQL Slave Server
In summary the procedure is:
In
mysql client:STOP SLAVE;
FLUSH TABLES;From OS:
/etc/init.d/mysql stopI would reboot at this point and then after the system has booted:
In
mysql client (the mysql daemon is configured to start on boot):START SLAVE;Does this look about right? Is there anything else I should be doing?
Solution
This looks right. The slave will pick up where it left off when it starts back up.
I will note that unless you supply the --skip-slave-start option, the slave should start automatically.
I will note that unless you supply the --skip-slave-start option, the slave should start automatically.
Context
StackExchange Database Administrators Q#5528, answer score: 9
Revisions (0)
No revisions yet.