MySQL 8.0 Database Administrator — Question 19
Consider this shell output and executed commands:
[root@oel7 ~]# ps aux | grep mysqld
mysql 2076 3.5 24.6 1386852 372572 ? Ssl 12:01 0:01 /usr/sbin/mysqid
[root@oel7 ~]# kill -15 2076
Which statement is true about MySQL server shutdown?
Answer options
- A. kill -15 should be avoided. Use other methods such as mysqladmin shutdown or systemctl stop mysqld.
- B. kill -15 and kill -9 are effectively the same forced shutdown that risk committed transactions not written to disk.
- C. kill -15 carries out a normal shutdown process, such as mysqladmin shutdown.
- D. mysqld_safe prohibits commands that would harm the operation of the server. An error would be returned by the kill command.
Correct answer: C
Explanation
The correct answer is C because the kill -15 command sends a SIGTERM signal, allowing the MySQL server to perform a graceful shutdown, similar to the mysqladmin shutdown command. Options A and B are incorrect as they misrepresent the nature of the SIGTERM signal and its effects, while option D is inaccurate because mysqld_safe does not prevent the kill command from being executed.