表'/tmp/#sql_3c51_0.MYI'的密钥文件不正确;尝试修复它 [英] Incorrect key file for table '/tmp/#sql_3c51_0.MYI'; try to repair it
本文介绍了表'/tmp/#sql_3c51_0.MYI'的密钥文件不正确;尝试修复它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我写了一个查询,它可以在我的本地服务器上正确运行,它的数据较少,
I wrote a query and this runs on my local server correctly it has less data,
但是当我在生产服务器上运行它时,会收到错误消息-(这大约有6GB的数据)
but when i run this on production server it gets an error - (this has more data around 6GB)
Incorrect key file for table '/tmp/#sql_3c51_0.MYI'; try to repair it
这是我的查询
SELECT
`j25_virtuemart_products`.`virtuemart_product_id`,
`product_name`,
`product_unit`,
`product_s_desc`,
`file_url_thumb`,
`virtuemart_custom_id`,
`custom_value`
FROM
`j25_virtuemart_product_customfields`,
`j25_virtuemart_products`,
`j25_virtuemart_products_en_gb`,
`j25_virtuemart_product_medias`,
`j25_virtuemart_medias`
WHERE
(
`j25_virtuemart_products`.`virtuemart_product_id`=`j25_virtuemart_products_en_gb`.`virtuemart_product_id`
AND
`j25_virtuemart_products`.`virtuemart_product_id`=`j25_virtuemart_product_customfields`.`virtuemart_product_id`)
AND
`j25_virtuemart_products`.`virtuemart_product_id`=`j25_virtuemart_product_medias`.`virtuemart_product_id`
AND
`j25_virtuemart_product_medias`.`virtuemart_media_id`=`j25_virtuemart_medias`.`virtuemart_media_id`
GROUP BY `j25_virtuemart_products`.`virtuemart_product_id`
LIMIT 0, 1000;
任何人都知道如何从该错误中恢复-诸如优化此查询或任何其他方式 谢谢
Anyone know how to recover from that error - something like otimize this query or any other way thank you
推荐答案
执行以下步骤
停止mysql服务
将.myi文件重命名为x.old
rename the .myi file to x.old
启动mysql
修复查询中的所有表,MySQL将重建密钥文件
REPAIR all the tables in query ,MySQL will rebuild key file
这篇关于表'/tmp/#sql_3c51_0.MYI'的密钥文件不正确;尝试修复它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文