Gefferey Zhang
Gefferey Zhang

Reputation: 95

mysql stalled after i kill process and the disk is 100% full

My server is 94% full, so i try to change some mysql column from int to tinyint to free some space, however, one table is so large that when i run

ALTER TABLE `app_play_data` CHANGE `countryId` `countryId` TINYINT(11) UNSIGNED NOT NULL

it began to copy data to tmp table. when i run show processlist, the state is copy to tmp table.

then i use kill to stop the process

it shows killed after i do that, however, the state changes to repair by sorting.

but the disk is 100% full now, and the state just stayed the same for long time,

How can I fix this without damaging the table?

Upvotes: 0

Views: 522

Answers (1)

Nickolai Nielsen
Nickolai Nielsen

Reputation: 942

Killing a process that are doing a "alter table" is very dangerous!

MySQL don't like it when the disk is 100% full.

Best solution is to free up some space or grow the drive NOW!.

In most cases MySQL will wait until there are free space and continue doing its work.

Upvotes: 1

Related Questions