We had an ALTER TABLE statement that added a new column which was taking quite a long time on status

copying to tmp table

Given we did not know how long it will take we decided to kill the query in MySQL using kill.

Now the query is on status killed but still blocks the whole table and except for the CPU being 100% the kill does not seem to have any effect.

How does the kill work and can I get a status indication of the time it will take?

  • What was the actual ALTER statement? There are many variants; they work differently. Also, what version of MySQL? – Rick James Mar 27 '18 at 22:51
  • We had an add column statement. I have to check the version, though – Xtroce Mar 27 '18 at 22:53

Since all processes that talked to the specific database where stopped beforehand, we ended up backupping the data on the harddisk and then killing the MySql process. This worked fine, but i can imagine that this is not the best practice when a lot is going on on the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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