July 3, 2019

Save SQL data on server shutdown

To avoid any lose of data when you want to shut down your server the best option is to stop SQL from collecting data by flush-tables before you shut down your server

You can do this with this command in the shell

mysqladmin flush-tables && sleep 60 && shutdown -h now && shutdown -h now

Share

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *