Mysql – ny risk associated with stopping thesqldump incomplete

mysqldump

I started to backup 30GB table at wrong time and now I want to stop it because it is estimated to take 7.5hours.

I used following command and options:
mysqldump -u db -p user table –hex-blob | gzip> 25Nov-table.sql.gz

My question is how to stop mysqldump now (leaving backup incomplete) without inflicting any damage to my database (though I think there will be no risk)?

Best Answer

You should be able to stop mysqldump by pressing control-c... or if it's running in the background, by killing the mysqldump process.

The server will realize almost immediately that the client connection mysqldump was holding has gone away and will release any table locks (held by mysqldump, if any) automatically.

This should be a completely safe operation.