MySQLdump Got error: 29

mysql-logo

ใช้ Mysql Dump แล้วเจอ error ตามนี้mysqldump: Got error: 29: File './thaiavTmp/Shop_Ext.MYD' not found (Errcode: 24) when using LOCK TABLE
เค้าบอกว่าให้ไปเพิ่ม config open_files_limit to 8192
( ปกติมันจะ open_files_limit = 512) แค่นี้ก็หายแล้ว

MySQL Incorrect key file for table

126 Incorrect key file for table '/tmp/#sql_767b_0.MYI'; try to repair it

พบปัญหา user ไม่สามารถใช้งาน บาง function ใน Portal ได้ โดยมี error ตามด้านบน ไล่ตามจนไปเจอ query 1 ตัวที่ ralate กับ user id 18 เท่านั้น
ปัญหาคือ disk ที่เก็บไฟล์ temp table เต็ม เข้าใจว่าถ้าไม่ได้ config tmp directory ไว้ MySQL จะมีค่า default ของ tmp directory อยู่ที่ /tmp, /usr/tmp, /var/tmp อย่างใดอย่างหนึง แต่ case ที่เจอ สงสัยว่าจะไปอยู่ใน memory เพราะ disk ยังมีพื้นที่อีกเยอะ วิธีแก้ใข ให้ไปเพิ่ม config ที่ my.cnf แล้ว reboot server (restart service ใช้ไม่ได้ผล)

tmpdir = /var/tmp