The ALTER TABLE statement will never end, log in to MySQL to view show Processlist, and the ALTER TABLE statement in the "Repair with Keycache" state. When importing MySQL data, repair by sorting error occurred, data is stuck and cannot continue importing
If repair with Keycache is present, the TMP space is insufficient .... At this time MySQL performance is very low, and can not take the kill process, so patience to wait for the operation to complete it.
While the memory is sufficient, this process should be prompted repair by sorting
View Memory
Free-m
Google, the discovery is the MySQL configuration problem, so according to the network's recommendations, modified the following configuration
To modify some of the MY.CNF parameters:
Myisam_sort_buffer_size = 1024M
Tmp_table_size = 256M
Tmpdir =/data/tmp/sql
myisam_max_sort_file_size=20g
Restart the database, and then re-import
View Processlist, and soon the table creation is complete.
This article from "Ops said: from rookie to veteran" blog, please be sure to keep this source http://liuqunying.blog.51cto.com/3984207/1669174
Mysql:repair with Keycache