在外部磁碟機上安裝後無法啟動 mysql (xampp)

在外部磁碟機上安裝後無法啟動 mysql (xampp)

我決定將 XAMPP 安裝移至外部磁碟機。它是 USB3 3TB 希捷硬碟。不幸的是 mysql 不想啟動。如果我將 XAMPP 安裝到 C 驅動器,則一切正常,但當我在外部驅動器上嘗試相同操作時,一切都不起作用。我多次卸載並重新啟動計算機,清除計算機中mysql的所有痕跡,但仍然遇到相同的錯誤。

這是全新安裝,資料庫中沒有資料。我還刪除了零位元組資料文件,就像建議的錯誤日誌一樣,但是每次我嘗試重新啟動時都會再次建立文件。

這是日誌檔案內容:

131003 11:36:20 [Note] Plugin 'FEDERATED' is disabled.
131003 11:36:20 InnoDB: The InnoDB memory heap is disabled
131003 11:36:20 InnoDB: Mutexes and rw_locks use Windows interlocked functions
131003 11:36:20 InnoDB: Compressed tables use zlib 1.2.3
131003 11:36:20 InnoDB: Initializing buffer pool, size = 16.0M
131003 11:36:20 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file F:\design\code\mysql\data\ibdata1
131003 11:36:20 InnoDB: Could not open or create data files.
131003 11:36:20 InnoDB: If you tried to add new data files, and it failed here,
131003 11:36:20 InnoDB: you should now edit innodb_data_file_path in my.cnf back
131003 11:36:20 InnoDB: to what it was, and remove the new ibdata files InnoDB created
131003 11:36:20 InnoDB: in this failed attempt. InnoDB only wrote those files full of
131003 11:36:20 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
131003 11:36:20 InnoDB: remove old data files which contain your precious data!
131003 11:36:20 [ERROR] Plugin 'InnoDB' init function returned error.
131003 11:36:20 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
131003 11:36:20 [ERROR] Unknown/unsupported storage engine: InnoDB
131003 11:36:20 [ERROR] Aborting

131003 11:36:20 [Note] f:\design\code\mysql\bin\mysqld.exe: Shutdown complete

我已經嘗試過其他主題中提到的一些建議,例如這個

innodb_buffer_pool_size = 256M
innodb_log_file_size    = 256M
innodb_thread_concurrency   = 16
innodb_flush_log_at_trx_commit = 2

還是沒有變化。任何幫助,將不勝感激。

編輯:已解決(見下文)

答案1

經過更多的研究、實驗和頭痛(這從昨晚開始就困擾著我),我找到了解決方案。除了在my.ini文件中添加上述更改之外

innodb_buffer_pool_size = 256M
innodb_log_file_size    = 256M
innodb_thread_concurrency   = 16
innodb_flush_log_at_trx_commit = 2

my.ini我還將這一行添加到文件末尾

innodb_flush_method=normal

現在一切都很好。看起來這是與 2TB+ 硬碟上的大扇區大小相關的錯誤。該解決方案的來源可以在這一頁

答案2

將您的後端更改為MyISAMfrom InnoDB,您的mysql編譯沒有InnoDB

相關內容