ERROR 1030 (HY000): Got error 1 from storage engine

เมื่อ MySQL เกิด Error อย่างนี้ คือเกิดอะไรขึ้น (MySQL4.0)

เหตุมันเกิดที่ มาวันนึงผมไม่สามารถ Start MySQL Service ได้ เนื่องจากผมไป Skip InnoDB ใน my.ini แล้วก็ไม่ได้ Restart MySQL Service แล้วเครื่อง ทำการ Update Windows ซึ่ง Windows ก็จับ Restart ตัวเองตอนตี 3 พอ Restart เสร็จก็ Start MySQL Service ไม่ได้ จะขึ้น Error

System error 1067 has occurred

ผมก็ลืมไปว่า ไป Skip InnoDB ไว้ เลยไปลบไฟล์

ib_logfile0
ib_logfile1
ibdata1

เพื่อลองแก้ปัญหาดู
แต่ก็ยังไม่หาย เผอิญนึกขึ้นได้ ก็เลยไป เอา Comment ใน my.ini ตรง #skip-innodb ใส่ไว้ตามเดิม แล้วลอง Start Service Mysql ใหม่ ก็สามารถใช้งานได้ตามปกติ

สำหรับคนที่ Start MySQL Service ไม่ขึ้น แนะนำว่าให้ลอง รัน MySQL โดยไม่ Start Service ดู ก็จะพบ Error ที่ชัดเจนกว่า Error ในการ Start Service แบบธรรมดา

ของผมลอง mysqld –defaults-file=F:\MySQLx\my.ini –standalone

ก็จะพบ Error ทำให้ทราบว่า skip innodb ไป

แต่เมื่อ Start MySQL Service แล้วกลับพบว่า DB ของ WordPress ไม่สามารถใช้งานได้เลยเลยสักเว็บ โดยจะขึ้น

Error “Got error 1 from storage engine”

เวลา Query ข้อมูล ผมลองเข้าไป ดู Error ใน ไฟล์

F:\MySQLx\data\ชื่อเครื่อง.err ก็พบ Error ว่าตอน Select ข้อมูลจะมี Error ดังนี้

070816 11:09:49 InnoDB error:
Cannot find table db_bangkokr/wp_links from the internal data dictionary
of InnoDB though the .frm file for the table exists. Maybe you
have deleted and recreated InnoDB data files but have forgotten
to delete the corresponding .frm files of InnoDB tables, or you
have moved .frm files to another database?
Look from section 15.1 of http://www.innodb.com/ibman.html
how you can resolve the problem.

ผมก็เดาเลยว่า น่าจะเป็น 3 ไฟล์ที่ผมลบทิ้งไป ผมเลย Stop Service เอาไฟล์มาคืนที่เดิม แล้วสั่ง Start Service ใหม่
ก็สามารถใช้งาน ได้ตามปกติ

สรุป โปรแกรมไมไ่ด้ Error อะไรเลย มีแต่ Human Error ครับ – -”

Powered by ScribeFire.

Leave a Reply