本來還好好的,但不知道為甚麼突然打不開了
有上網找解決方法,但還是很不安因為裡面已經存有很多資料了,我怕我一改動就甚麼都沒了
網路上是說Xampp\mysql\data 這個資料夾重新命名成另外一個名稱,再新建一個data然後把backup 內的所有內容複製到新建立的data裡,再從舊data複製除了 mysql、performance_schema 以及 phpmyadmin 等資料夾的所有檔案,到新的 mysql\data
我想問這樣做後我資料還會在嗎?尤其是我設定的權限
還有我也不知道我錯誤log的顯示,是不是就是對應我這方法的解
請大家幫幫忙,謝謝大家
2021-08-23 22:41:00 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-08-23 22:41:00 0 [Note] InnoDB: Uses event mutexes
2021-08-23 22:41:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-08-23 22:41:00 0 [Note] InnoDB: Number of pools: 1
2021-08-23 22:41:00 0 [Note] InnoDB: Using generic crc32 instructions
2021-08-23 22:41:00 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-08-23 22:41:00 0 [Note] InnoDB: Completed initialization of buffer pool
2021-08-23 22:41:01 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-08-23 22:41:01 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-08-23 22:41:01 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-08-23 22:41:01 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-08-23 22:41:01 0 [Note] InnoDB: Waiting for purge to start
2021-08-23 22:41:01 0 [Note] InnoDB: 10.4.18 started; log sequence number 20745148; transaction id 17753
2021-08-23 22:41:01 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-08-23 22:41:01 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-08-23 22:41:01 0 [Note] Server socket created on IP: '::'.
開始發生錯誤訊息之前的log
2021-08-20 23:12:12 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-08-20 23:12:12 0 [Note] InnoDB: Uses event mutexes
2021-08-20 23:12:12 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-08-20 23:12:12 0 [Note] InnoDB: Number of pools: 1
2021-08-20 23:12:12 0 [Note] InnoDB: Using generic crc32 instructions
2021-08-20 23:12:12 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-08-20 23:12:12 0 [Note] InnoDB: Completed initialization of buffer pool
2021-08-20 23:12:12 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1157819
2021-08-20 23:12:13 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-08-20 23:12:13 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-08-20 23:12:13 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-08-20 23:12:13 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-08-20 23:12:13 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-08-20 23:12:13 0 [Note] InnoDB: Waiting for purge to start
2021-08-20 23:12:13 0 [Note] InnoDB: 10.4.18 started; log sequence number 1157828; transaction id 1945
2021-08-20 23:12:13 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-08-20 23:12:13 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-08-20 23:12:13 0 [Note] Server socket created on IP: '::'.
2021-08-23 21:48:46 0 [ERROR] mysqld.exe: Index for table '.\mysql\db' is corrupt; try to repair it
***WARNING: .\mysql\db could not be opened: Error: 126
InnoDB: using atomic writes.
2021-08-23 21:48:46 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-08-23 21:48:46 0 [Note] InnoDB: Uses event mutexes
2021-08-23 21:48:46 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-08-23 21:48:46 0 [Note] InnoDB: Number of pools: 1
2021-08-23 21:48:46 0 [Note] InnoDB: Using generic crc32 instructions
2021-08-23 21:48:46 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-08-23 21:48:46 0 [Note] InnoDB: Completed initialization of buffer pool
2021-08-23 21:48:46 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=20745031
2021-08-23 21:48:49 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-08-23 21:48:49 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-08-23 21:48:49 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-08-23 21:48:49 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-08-23 21:48:49 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-08-23 21:48:49 0 [Note] InnoDB: Waiting for purge to start
2021-08-23 21:48:49 0 [Note] InnoDB: 10.4.18 started; log sequence number 20745040; transaction id 17753
2021-08-23 21:48:49 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-08-23 21:48:49 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-08-23 21:48:49 0 [Note] Server socket created on IP: '::'.
InnoDB: using atomic writes.
資料應該是沒有問題,先把Xampp\mysql\data複製到別的地方,是正確的第一步。
接著,最好是把整個XAMPP移除乾淨,再重新安裝,確定它能啟動,結束XAMPP,
再把備份出來的data夾放回去,再啟動它看看。
注意,XAMPP 要安裝同一個版本
最重要的是,您平常都沒有做備份嗎?
依照以下動作做一次處理
1.先將 mysql/data 改名為 mysql/dataBack
2.再將 mysql/backup COPY出來成 mysql/data
3.重新啟動試試,如果成功的話。
4.當成功啟用時。請先關閉MYSQL。
5.再試著從 dataBack 的你的資料表再COPY過來data(請勿全部COPY)
基本上最好是一個一個COPY。每COPY一個資料庫就要啟動試試。