我在服務器S1(mysql版本5.1.41-3ubuntu12.7-log)上有mysql數據庫,我在服務器S2上創建了這個數據庫的主從服務器(mysql version 5.1.54-1ubuntu4-log)。
S1上的DB正在使用一個數據文件(ibdata)。在將數據庫轉儲到S2後,我將innodb_file_per_table設置爲1。這使每個表都有自己的ibd文件。現在一切都很順利。
但S2重新啓動mysql的後,我面臨着一個問題,收到此錯誤:
Error 'Unknown table engine 'InnoDB'' on query. Default database: MyDB
,當我試圖表明發動機查詢時發生錯誤'未知表引擎'InnoDB''。重新啓動mysql之後
show engines; +------------+---------+----------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +------------+---------+----------------------------------------------------------------+--------------+------+------------+ | MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO | | CSV | YES | CSV storage engine | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | | ARCHIVE | YES | Archive storage engine | NO | NO | NO | +------------+---------+----------------------------------------------------------------+--------------+------+------------+
InnoDB中沒有列出。
錯誤日誌中我可以看到這一點:
InnoDB: Database physically writes the file full: wait... InnoDB: Cannot initialize created log files because InnoDB: data files are corrupt, or new data files were InnoDB: created when the database was started previous InnoDB: time but the database was not shut down InnoDB: normally after that. 111016 8:24:11 [ERROR] Plugin 'InnoDB' init function returned error. 111016 8:24:11 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 111016 8:24:11 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=S2-relay-bin' to avoid this problem.
我試圖刪除ib_logfiles但這並沒有正常工作。
有人遇到這樣的問題之前?任何想法高度讚賞
謝謝
嘗試http://www.youdidwhatwithtsql.com/unknown-table-engine-innodb/760 – Bala