MariaDB (MySQL)出現table doesn’t exist in engine錯誤

  在自己的電腦架了個Joomla網站,之後準備移到正式環境,在將各項目一個一個複製過去後,卻遇到問題無法開啟網站的問題,抽絲剝繭後,範圍縮小到資料庫的問題,以往使用MySQL時,只要將data目錄下的檔案複製起來,就可以完成搬移,這次卻無法這樣做,You must use other tools to do the database export and then import the job。In the past have read the article,建議資料的備份還原最好用匯出/入的方式,別用複製貼上,這下總算遇到問題,因此便想瞭解原因何在,在反覆測試並上網搜尋後,Finally find out the sticking point。

  出現這種情形,倒也不是MariaDB的關係,而是InnoDB這個資料庫引擎,以往舊的MySQL主要採MyISAM引擎,資料庫檔案有.MYD(資料)與.MYI(索引)兩個型式,This architecture using copy and paste will not have any problems。And adopted a new version of MariaDB and MySQL InnoDB engine,則是.frm與.ibd,若要使用複製貼上的方式備份,除了備份以上檔案外,還需將data目錄底下的ibdata1也複製,To recover correctly。

【參考連結】

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.