In MySQL 8.0.21, we can see who and how mysqld
was
stopped and when the process ended.
Let’s have a look at different scenarios in this article.
SHUTDOWN SQL statement
The first test is to initiate the shutdown of MySQL from a SQL client:
mysql> shutdown;
In the error log (log_error_verbosity is set to 2, the default), we can see:
2020-07-14T07:17:28.865274Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.21). 2020-07-14T07:17:31.258884Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21) MySQL Community Server - GPL.
We can easily identify when the server started the shutdown process and when it finished.
Stopping using systemd
…[Read more]