Whether for a maintenance, applying non dynamic config changes,
MySQL upgrade or other many reasons, a MySQL shutdown/restart is
required.
In this post I’ll list some of the best practices before shutting
MySQL down to make it clean and fast which in turn, will lead to
fast and safe start!
-
Double check the instance you are going to
shutdown!!
First of all, and before doing anything confirm first the instance you are going to shutdown. You definitely, don’t want to shutdown a wrong MySQL instance by mistake, especially, when you’re working on production environments. -
Stop Replication:
Although MySQL stops the replication automatically in the shutting down process but if it didn’t stop for any reason before the timeout is reached, it will be killed. So, if that server is a slave, it’s better to stop the replication threads first …