Trying to kill a process that running a MySQL database backup, and has the tables locked. What will happen if I kill the process?
Asked
Active
Viewed 1,066 times
1 Answers
1
It depends on the process that is doing the backup. Also, it depends on the signal you have sent to the process.
If you killed the process using a SIGTERM
signal, the process may have implemented a proper signal handler. In this case, the process will be able to unlock the table before exiting.
If you killed the process using a SIGKILL
signal (kill -9)
, the process will not have a chance to clean things up before exiting. So, the tables will remain locked. In this case, only mysql server will be able to unlock the tables (I am not sure if it will really do this).

Khaled
- 36,533
- 8
- 72
- 99
-
Its a better idea to use 'mysqladmin kill' rather than sending a signal directly to the client app - this at least allows the DBMS to handle the clean up more gracefully. – symcbean Nov 05 '10 at 12:25