2013-09-26 104 views
1

我開始我認爲是我的問題的開始:MySql的「表犯規存在」

我出口MySQL數據庫從在線服務器到本地服務器,所以我可以在上面測試沒有風險。

但在XAMPP我無法重新啓動mysql的模塊。該

11:02:54 [mysql] Attempting to start MySQL app... 

什麼也沒做,但引發此錯誤

10:57:49 [mysql] Error: MySQL shutdown unexpectedly. 
10:57:49 [mysql] This may be due to a blocked port, missing dependencies, 
10:57:49 [mysql] improper privileges, a crash, or a shutdown by another method. 
10:57:49 [mysql] Press the Logs button to view error logs and check 
10:57:49 [mysql] the Windows Event Viewer for more clues 
10:57:49 [mysql] If you need more help, copy and post this 
10:57:49 [mysql] entire log window on the forums 

我看着它在互聯網和唯一的工作解決方案,我發現,在每次啓動之前刪除 了MySQL /數據/ ibdata1中文件。我知道它的一個骯髒的解決方案,但它的工作,我不想在這上面花太多時間。

現在的實際問題:我添加了一個新表。在下次重啓(包括刪除了ibdata1中的文件)後,我看到在phpMyAdmin左邊列的表,但是當我點擊「+」,其完全地空。當我點擊名稱時,出現錯誤

#1146 table doesnt exist 

如果我嘗試創建一個具有相同名稱的新表,我會得到相同的錯誤。

這是XAMPP日誌文件:

2013-09-27 11:17:21 4284 [Note] Plugin 'FEDERATED' is disabled. 
2013-09-27 11:17:21 21e8 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. 
2013-09-27 11:17:21 4284 [Note] InnoDB: The InnoDB memory heap is disabled 
2013-09-27 11:17:21 4284 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 
2013-09-27 11:17:21 4284 [Note] InnoDB: Compressed tables use zlib 1.2.3 
2013-09-27 11:17:21 4284 [Note] InnoDB: Not using CPU crc32 instructions 
2013-09-27 11:17:21 4284 [Note] InnoDB: Initializing buffer pool, size = 16.0M 
2013-09-27 11:17:21 4284 [Note] InnoDB: Completed initialization of buffer pool 
2013-09-27 11:17:21 4284 [Note] InnoDB: The first specified data file C:\xampp\mysql\data\ibdata1 did not exist: a new database to be created! 
2013-09-27 11:17:21 4284 [Note] InnoDB: Setting file C:\xampp\mysql\data\ibdata1 size to 10 MB 
2013-09-27 11:17:21 4284 [Note] InnoDB: Database physically writes the file full: wait... 
2013-09-27 11:17:21 4284 [Note] InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile101 size to 5 MB 
2013-09-27 11:17:21 4284 [Note] InnoDB: Setting log file C:\xampp\mysql\data\ib_logfile1 size to 5 MB 
2013-09-27 11:17:21 4284 [Note] InnoDB: Renaming log file C:\xampp\mysql\data\ib_logfile101 to C:\xampp\mysql\data\ib_logfile0 
2013-09-27 11:17:21 4284 [Warning] InnoDB: New log files created, LSN=45781 
2013-09-27 11:17:21 4284 [Note] InnoDB: Doublewrite buffer not found: creating new 
2013-09-27 11:17:21 4284 [Note] InnoDB: Doublewrite buffer created 
2013-09-27 11:17:22 4284 [Note] InnoDB: 128 rollback segment(s) are active. 
2013-09-27 11:17:22 4284 [Warning] InnoDB: Creating foreign key constraint system tables. 
2013-09-27 11:17:22 4284 [Note] InnoDB: Foreign key constraint system tables created 
2013-09-27 11:17:22 4284 [Note] InnoDB: Creating tablespace and datafile system tables. 
2013-09-27 11:17:22 4284 [Note] InnoDB: Tablespace and datafile system tables created. 
2013-09-27 11:17:22 4284 [Note] InnoDB: Waiting for purge to start 
2013-09-27 11:17:22 4284 [Note] InnoDB: 5.6.11 started; log sequence number 0 
2013-09-27 11:17:22 4284 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 9dce5432-2755-11e3-835a-20689d9d84a8. 
2013-09-27 11:17:22 4284 [Note] Server hostname (bind-address): '*'; port: 3306 
2013-09-27 11:17:22 4284 [Note] IPv6 is available. 
2013-09-27 11:17:22 4284 [Note] - '::' resolves to '::'; 
2013-09-27 11:17:22 4284 [Note] Server socket created on IP: '::'. 
2013-09-27 11:34:15 3928 [Note] Plugin 'FEDERATED' is disabled. 
2013-09-27 11:34:15 12d0 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. 
2013-09-27 11:34:15 3928 [Note] InnoDB: The InnoDB memory heap is disabled 
2013-09-27 11:34:15 3928 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 
2013-09-27 11:34:15 3928 [Note] InnoDB: Compressed tables use zlib 1.2.3 
2013-09-27 11:34:15 3928 [Note] InnoDB: Not using CPU crc32 instructions 
2013-09-27 11:34:15 3928 [Note] InnoDB: Initializing buffer pool, size = 16.0M 
2013-09-27 11:34:15 3928 [Note] InnoDB: Completed initialization of buffer pool 
2013-09-27 11:34:15 3928 [Note] InnoDB: Highest supported file format is Barracuda. 
2013-09-27 11:34:15 3928 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 2203529 in the ib_logfiles! 
2013-09-27 11:34:15 3928 [Note] InnoDB: Database was not shutdown normally! 
2013-09-27 11:34:15 3928 [Note] InnoDB: Starting crash recovery. 
2013-09-27 11:34:15 3928 [Note] InnoDB: Reading tablespace information from the .ibd files... 
2013-09-27 11:34:15 3928 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_index_stats uses space ID: 2 at filepath: .\mysql\innodb_index_stats.ibd. Cannot open tablespace mydatabase/blackboard which uses space ID: 2 at filepath: .\tum_mitfahrer_app\blackboard.ibd 
InnoDB: Error: could not open single-table tablespace file .\tum_mitfahrer_app\blackboard.ibd 
InnoDB: We do not continue the crash recovery, because the table may become 
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it. 
InnoDB: To fix the problem and start mysqld: 
InnoDB: 1) If there is a permission problem in the file and mysqld cannot 
InnoDB: open the file, you should modify the permissions. 
InnoDB: 2) If the table is not needed, or you can restore it from a backup, 
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal 
InnoDB: crash recovery and ignore that table. 
InnoDB: 3) If the file system or the disk is broken, and you cannot remove 
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf 
InnoDB: and force InnoDB to continue crash recovery here. 

其對Windows 8的運行可能是一些關於失蹤的權限,但我重新安裝了從C XAMPP:\ Program Files文件\ XAMPP到c:\ XAMPP - >同問題。我不得不刪除ibdata1中得到它的開始,每一個新的表我建立後消失。

+0

你是如何導出/導入數據庫? – BT643

+0

在phpMyAdmin(服務器版本:5.5.29)我剛剛點擊導出(如SQL),然後導入在我的本地XAMPP的phpMyAdmin的實例文件(服務器版本:5.6.11) – Simon

+1

而你嘗試過什麼說的嗎? 「_Press日誌按鈕來查看錯誤日誌和檢查Windows事件查看器更clues_」。你可能會得到更多的信息,你可以在這裏發佈,以確切知道發生了什麼。 – BT643

回答

0

好像在MySQL 5.6 known bug
他們還提到一個解決方法:[2012年11月27日8:39]

陽光班 這是錯誤#67179重複。只是不同的副作用。 Windows安裝程序?顯然複製了.ibd文件並導致了問題。數據/ MySQL中的。如果你想恢復您的文件,你必須做到以下幾點:

  1. 刪除數據/ MySQL的/ * IBD文件和相應的.FRM文件的文件的.ibd
  2. 啓動服務器 - 。 -skip-從啓動
  3. 你應該能夠訪問和備份您的數據

我注意到的是,在關機時,你會得到另一種失敗。我需要調查這個問題,其他的原因。稍後我會發布更新。

如果它不起作用,請嘗試Restoring MySQL InnoDB Files on Windows這是更多的XAMPP相關。

+0

當我使用InnoDB以外的其他格式(例如MyISAM)創建新表格時,表格在我的「delete-ibdata1-before-restart」例程後仍然存在。現在這就是我需要的。 – Simon