Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Trying to kill a process that running a MySQL database backup, and has the tables locked. What will happen if I kill the process?

share|improve this question
    
You need to look up transactions and trip ACID (atomicity, consistency, isolation, durability). Other databases (remaining anonymous) will assure recovery in x seconds or blocks read/written. Contact by email for details... –  ArrowInTree Dec 15 '12 at 1:54

1 Answer 1

up vote 1 down vote accepted

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).

share|improve this answer
    
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 5 '10 at 12:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.