Because the operator a large number of deleted relationship table data up to 20 million rows, but MySQL does not automatically reclaim space, so decided to do defragmentation (first Test):
Myisamchk-r relationship
Under the MySQL run, the results of the query when the following problems appear:
Error 1030 (00000): Got error 127 from table handler
This question is very depressed, should not have the problem, then looked up the data to discover the question:
If you run mysqld with--skip-locking (it is default on some systems, such as Linux), when
When MYSQLD is using the same table, you cannot reliably use MYISAMCHK to check a table. If you can
Sure no one is accessing the table through MYSQLD while you're running Myisamchk, before you start checking the table,
You only need to do mysqladmin flush-tables. If you can't guarantee, then when you check the table, you will
Must stop mysqld. If you run Myisamchk when mysqld is updating the table, you may get a table
Had destroyed the warning, even if it had not.
If you are not using--skip-locking, you can use the Myisamchk checklist at any time. When you do this
, all customers attempting to update the table will wait until MYISAMCHK is ready before continuing.
If you use the Myisamchk fix or optimize the table, you must always ensure that the MYSQLD server is not using the table (such as
You are using--skip-locking, which is also applicable). If you keep dropping mysqld, running in your
Before Myisamchk, you should at least make a mysqladmin flush-tables.
And my database happens to be under Linux, and is skip-locking started, there is this problem!
1 This command can also stop MySQL and then do, it will not appear this problem
2) can also be done online after the restart of the database
3) You can also run Mysqladmin flush-tables before you execute this command, and this problem will not occur!