【问题标题】:mysql incorrect key filemysql 不正确的密钥文件
【发布时间】:2011-07-16 04:30:21
【问题描述】:

我在 mysql 中收到此错误。我试图修复它很多次,但它仍然存在。我还修好了所有的桌子。

morein_db/categories.MYI'; try to repair it
110716  9:58:16 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './morein_db/categories.MYI'; try to repair it
110716  9:58:16 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './morein_db/categories.MYI'; try to repair it
110716  9:58:16 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './morein_db/products_stock.MYI'; try to repair it
110716  9:58:16 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './morein_db/products_stock.MYI'; try to repair it

110716 10:01:03 [ERROR] Got an error from thread_id=3586, /builddir/build/BUILD/mysql-5.5.10/storage/myisam/mi_write.c:222

【问题讨论】:

    标签: mysql file crash key


    【解决方案1】:

    关闭 MySQL 服务器,在 MySQL datadir 中将目录更改为 morein_db 并执行 myisamchk 实用程序

    myisamchk --silent --force --fast --update-state --key_buffer_size=64M --sort_buffer_size=64M --read_buffer_size=1M --write_buffer_size=1M *.MYI
    

    这假设您有超过 64M 的可用 RAM。如果增加这些缓冲区,修复会更快。您可以在此处查看(非常方便的)myisamchk 实用程序的详细信息: http://dev.mysql.com/doc/refman/5.6/en/myisamchk.html

    【讨论】:

      猜你喜欢
      • 2011-04-23
      • 1970-01-01
      • 2011-01-01
      • 1970-01-01
      • 2013-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-11
      相关资源
      最近更新 更多