MYSQL無法啟動提示: Default storage engine (InnoDB) is not available的解決方案

來源:互聯網
上載者:User

在my.ini(linux下/etc/my.cnf)加上skip-innodb,就可以了。
我這樣設定後,在linux下都沒問題,今天在我本機winXP啟動MYSQL,提示啟動不起來。看下mysql目錄的錯誤記錄檔:
引用
090613 10:15:27 [ERROR] Default storage engine (InnoDB) is not available
090613 10:15:27 [ERROR] Aborting

090613 10:15:27 [Note] C:\www\mysql\bin\mysqld-nt: Shutdown complete

估計是上次加了參數後,一直沒啟動起來。。。已經很久沒用原生mysql了。
查了下,原來my.ini裡有一句:default-storage-engine=INNODB,把預設的engine設為INNODB,而我又加了skip-innodb,怪不得啟不來了。

將default-storage-engine改為MYISAM,MYSQL啟動OK!
在skip-innodb下,data目錄下的ibdata1,ib_logfile0,ib_logfile1這三個檔案就不需要了,就可以刪除。

測試了下,在沒加skip-innodb時,刪除了這三個檔案,啟動時會自動建立這三個檔案,日誌如下:
引用
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
090613 10:19:37 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
090613 10:19:37 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 24 MB
InnoDB: Database physically writes the file full: wait...
090613 10:19:38 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 24 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
090613 10:19:39 InnoDB: Started; log sequence number 0 0
090613 10:19:39 [Note] C:\www\mysql\bin\mysqld-nt: ready for connections.

再刪除這三個檔案,加了skip-innodb後,開機記錄:
引用

090613 10:30:12 [Note] C:\www\mysql\bin\mysqld-nt: Normal shutdown

090613 10:30:12 [Note] C:\www\mysql\bin\mysqld-nt: Shutdown complete

090613 10:30:17 [Note] C:\www\mysql\bin\mysqld-nt: ready for connections.
Version: '5.0.45' socket: '' port: 3306 Source distribution

那三個檔案就不會自動產生了。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.