Mysql
MySQL 實例在從數據庫中選擇時崩潰
我有一個 MySQL 數據庫表,每當我從表中選擇或執行任何操作時,無論它有多小,它都會崩潰。它使整個 MySQL 實例崩潰。
表結構如下,使用innodb作為儲存引擎
id - int(10) name - varchar(100) image - varbinary(32k)
該表有大約 800k 條記錄,總大小為 30GB。
錯誤日誌
2016-10-20 12:52:16 2548 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. 2016-10-20 12:52:16 9544 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-10-20 12:52:16 9544 [Note] InnoDB: The InnoDB memory heap is disabled 2016-10-20 12:52:16 9544 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2016-10-20 12:52:16 9544 [Note] InnoDB: Memory barrier is not used 2016-10-20 12:52:16 9544 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-10-20 12:52:16 9544 [Note] InnoDB: Using generic crc32 instructions 2016-10-20 12:52:16 9544 [Note] InnoDB: Initializing buffer pool, size = 16.0M 2016-10-20 12:52:16 9544 [Note] InnoDB: Completed initialization of buffer pool 2016-10-20 12:52:16 9544 [Note] InnoDB: Highest supported file format is Barracuda. 2016-10-20 12:52:16 9544 [Note] InnoDB: The log sequence numbers 53259298805 and 53259298805 in ibdata files do not match the log sequence number 53259298901 in the ib_logfiles! 2016-10-20 12:52:16 9544 [Note] InnoDB: Database was not shutdown normally! 2016-10-20 12:52:16 9544 [Note] InnoDB: Starting crash recovery. 2016-10-20 12:52:16 9544 [Note] InnoDB: Reading tablespace information from the .ibd files... 2016-10-20 12:52:20 9544 [Note] InnoDB: Restoring possible half-written data pages 2016-10-20 12:52:20 9544 [Note] InnoDB: from the doublewrite buffer... 2016-10-20 12:52:21 9544 [Note] InnoDB: 128 rollback segment(s) are active. 2016-10-20 12:52:21 9544 [Note] InnoDB: Waiting for purge to start 2016-10-20 12:52:21 9544 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 53259298901 2016-10-20 12:52:22 6988 [Note] InnoDB: Dumping buffer pool(s) not yet started 2016-10-20 12:52:22 9544 [Note] Plugin 'FEEDBACK' is disabled. 2016-10-20 12:52:22 9544 [Note] Server socket created on IP: '::'. 2016-10-20 12:52:22 9544 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections. Version: '10.1.10-MariaDB' socket: '' port: 3306 mariadb.org binary distribution InnoDB: Error: trying to access page number 1217926 in space 2075, InnoDB: space name mj2016/mj1, InnoDB: which is outside the tablespace bounds. InnoDB: Byte offset 0, len 16384, i/o type 10. InnoDB: If you get this error at mysqld startup, please check that InnoDB: your my.cnf matches the ibdata files that you have in the InnoDB: MySQL server. 2016-10-20 12:52:40 102c InnoDB: Assertion failure in thread 4140 in file fil0fil.cc line 5821 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 161020 12:52:40 [ERROR] mysqld got exception 0x80000003 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see http://kb.askmonty.org/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 10.1.10-MariaDB key_buffer_size=16777216 read_buffer_size=262144 max_used_connections=2 max_threads=1001 thread_count=2 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 787099 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x5c991b8 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... mysqld.exe!my_parameter_handler() mysqld.exe!my_mb_ctype_mb() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!?free_frm_image@TABLE_SHARE@@QAEXPBE@Z() mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z() mysqld.exe!?ha_open@handler@@QAEHPAUTABLE@@PBDHI@Z() mysqld.exe!?open_table_from_share@@YA?AW4open_frm_error@@PAVTHD@@PAUTABLE_SHARE@@PBDIIIPAUTABLE@@_N@Z() mysqld.exe!?open_table@@YA_NPAVTHD@@PAUTABLE_LIST@@PAVOpen_table_context@@@Z() mysqld.exe!?recover_from_failed_open@Open_table_context@@QAE_NXZ() mysqld.exe!?open_tables@@YA_NPAVTHD@@ABUDDL_options_st@@PAPAUTABLE_LIST@@PAIIPAVPrelocking_strategy@@@Z() mysqld.exe!?mysqld_show_create@@YA_NPAVTHD@@PAUTABLE_LIST@@@Z() mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@@Z() mysqld.exe!?mysql_parse@@YAXPAVTHD@@PADIPAVParser_state@@@Z() mysqld.exe!?dispatch_command@@YA_NW4enum_server_command@@PAVTHD@@PADI@Z() mysqld.exe!?do_command@@YA_NPAVTHD@@@Z() mysqld.exe!?threadpool_process_request@@YAHPAVTHD@@@Z() mysqld.exe!?tp_end@@YAXXZ() KERNEL32.DLL!SetUserGeoID() ntdll.dll!TpReleaseTimer() ntdll.dll!TpReleaseTimer() KERNEL32.DLL!BaseThreadInitThunk() ntdll.dll!RtlSubscribeWnfStateChangeNotification() ntdll.dll!RtlSubscribeWnfStateChangeNotification() Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7b72080): SHOW CREATE TABLE `mj1` Connection ID (thread ID): 3 Status: NOT_KILLED Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 2016-10-20 13:03:51 2464 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. 2016-10-20 13:03:51 9316 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-10-20 13:03:51 9316 [Note] InnoDB: The InnoDB memory heap is disabled 2016-10-20 13:03:51 9316 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2016-10-20 13:03:51 9316 [Note] InnoDB: Memory barrier is not used 2016-10-20 13:03:51 9316 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-10-20 13:03:51 9316 [Note] InnoDB: Using generic crc32 instructions 2016-10-20 13:03:51 9316 [Note] InnoDB: Initializing buffer pool, size = 16.0M 2016-10-20 13:03:51 9316 [Note] InnoDB: Completed initialization of buffer pool 2016-10-20 13:03:51 9316 [Note] InnoDB: Highest supported file format is Barracuda. 2016-10-20 13:03:51 9316 [Note] InnoDB: The log sequence numbers 53259298805 and 53259298805 in ibdata files do not match the log sequence number 53259298911 in the ib_logfiles! 2016-10-20 13:03:51 9316 [Note] InnoDB: Database was not shutdown normally! 2016-10-20 13:03:51 9316 [Note] InnoDB: Starting crash recovery. 2016-10-20 13:03:51 9316 [Note] InnoDB: Reading tablespace information from the .ibd files... 2016-10-20 13:03:51 9316 [Note] InnoDB: Restoring possible half-written data pages 2016-10-20 13:03:51 9316 [Note] InnoDB: from the doublewrite buffer... 2016-10-20 13:03:53 9316 [Note] InnoDB: 128 rollback segment(s) are active. 2016-10-20 13:03:53 9316 [Note] InnoDB: Waiting for purge to start 2016-10-20 13:03:53 9316 [Note] InnoDB: Percona XtraDB 5.6.26-76.0 started; log sequence number 53259298911 2016-10-20 13:03:53 9316 [Note] InnoDB: !!! innodb_force_recovery is set to 1 !!! 2016-10-20 13:03:53 9296 [Note] InnoDB: Dumping buffer pool(s) not yet started 2016-10-20 13:03:53 9316 [Note] Plugin 'FEEDBACK' is disabled. 2016-10-20 13:03:53 9316 [Note] Server socket created on IP: '::'. 2016-10-20 13:03:53 9316 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections. Version: '10.1.10-MariaDB' socket: '' port: 3306 mariadb.org binary distribution InnoDB: Error: trying to access page number 1217926 in space 2075, InnoDB: space name mj2016/mj1, InnoDB: which is outside the tablespace bounds. InnoDB: Byte offset 0, len 16384, i/o type 10. InnoDB: If you get this error at mysqld startup, please check that InnoDB: your my.cnf matches the ibdata files that you have in the InnoDB: MySQL server. 2016-10-20 13:06:52 2ad0 InnoDB: Assertion failure in thread 10960 in file fil0fil.cc line 5821 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: InnoDB: about forcing recovery. 161020 13:06:52 [ERROR] mysqld got exception 0x80000003 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see http://kb.askmonty.org/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 10.1.10-MariaDB key_buffer_size=16777216 read_buffer_size=262144 max_used_connections=3 max_threads=1001 thread_count=3 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 787099 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x366efe8 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... mysqld.exe!my_parameter_handler() mysqld.exe!my_mb_ctype_mb() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!?free_frm_image@TABLE_SHARE@@QAEXPBE@Z() mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z() mysqld.exe!?ha_open@handler@@QAEHPAUTABLE@@PBDHI@Z() mysqld.exe!?open_table_from_share@@YA?AW4open_frm_error@@PAVTHD@@PAUTABLE_SHARE@@PBDIIIPAUTABLE@@_N@Z() mysqld.exe!?open_table@@YA_NPAVTHD@@PAUTABLE_LIST@@PAVOpen_table_context@@@Z() mysqld.exe!?recover_from_failed_open@Open_table_context@@QAE_NXZ() mysqld.exe!?open_tables@@YA_NPAVTHD@@ABUDDL_options_st@@PAPAUTABLE_LIST@@PAIIPAVPrelocking_strategy@@@Z() mysqld.exe!?open_and_lock_tables@@YA_NPAVTHD@@ABUDDL_options_st@@PAUTABLE_LIST@@_NIPAVPrelocking_strategy@@@Z() mysqld.exe!??_9handler@@$BBAE@AE() mysqld.exe!?execute@Sql_cmd_check_table@@UAE_NPAVTHD@@@Z() mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@@Z() mysqld.exe!?mysql_parse@@YAXPAVTHD@@PADIPAVParser_state@@@Z() mysqld.exe!?dispatch_command@@YA_NW4enum_server_command@@PAVTHD@@PADI@Z() mysqld.exe!?do_command@@YA_NPAVTHD@@@Z() mysqld.exe!?threadpool_process_request@@YAHPAVTHD@@@Z() mysqld.exe!?tp_end@@YAXXZ() KERNEL32.DLL!SetUserGeoID() ntdll.dll!TpReleaseTimer() ntdll.dll!TpReleaseTimer() KERNEL32.DLL!BaseThreadInitThunk() ntdll.dll!RtlSubscribeWnfStateChangeNotification() ntdll.dll!RtlSubscribeWnfStateChangeNotification() Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7ecaf58): CHECK TABLE `mj1` Connection ID (thread ID): 3 Status: NOT_KILLED Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 2016-10-20 13:26:38 1b8c 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. 2016-10-20 13:26:38 7052 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-10-20 13:26:38 7052 [Note] InnoDB: The InnoDB memory heap is disabled 2016-10-20 13:26:38 7052 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2016-10-20 13:26:38 7052 [Note] InnoDB: Memory barrier is not used 2016-10-20 13:26:38 7052 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-10-20 13:26:38 7052 [Note] InnoDB: Using generic crc32 instructions 2016-10-20 13:26:38 7052 [Note] InnoDB: Initializing buffer pool, size = 16.0M 2016-10-20 13:26:38 7052 [Note] InnoDB: Completed initialization of buffer pool 2016-10-20 13:26:38 7052 [Note] InnoDB: Highest supported file format is Barracuda. 2016-10-20 13:26:38 7052 [Note] InnoDB: The log sequence numbers 53259299380 and 53259299380 in ibdata files do not match the log sequence number 53259299390 in the ib_logfiles! 2016-10-20 13:26:38 7052 [Note] InnoDB: Database was not shutdown normally! 2016-10-20 13:26:38 7052 [Note] InnoDB: Starting crash recovery. 2016-10-20 13:26:38 7052 [Note] InnoDB: Reading tablespace information from the .ibd files... 2016-10-20 13:26:39 7052 [Note] InnoDB: Restoring possible half-written data pages 2016-10-20 13:26:39 7052 [Note] InnoDB: from the doublewrite buffer... 2016-10-20 13:26:40 7052 [Warning] InnoDB: Resizing redo log from 2*3072 to 2*320 pages, LSN=53259299390 2016-10-20 13:26:40 7052 [Warning] InnoDB: Starting to delete and rewrite log files. 2016-10-20 13:26:40 7052 [Note] InnoDB: Setting log file \xampp\mysql\data\ib_logfile101 size to 5 MB 2016-10-20 13:26:41 7052 [Note] InnoDB: Setting log file \xampp\mysql\data\ib_logfile1 size to 5 MB 2016-10-20 13:26:41 7052 [Note] InnoDB: Renaming log file \xampp\mysql\data\ib_logfile101 to \xampp\mysql\data\ib_logfile0 2016-10-20 13:26:41 7052 [Warning] InnoDB: New log files created, LSN=53259299852 2016-10-20 13:26:41 7052 [Note] InnoDB: 128 rollback segment(s) are active. 2016-10-20 13:26:41 7052 [Note] InnoDB: Waiting for purge to start 2016-10-20 13:26:41 7052 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 53259299390 2016-10-20 13:26:42 9856 [Note] InnoDB: Dumping buffer pool(s) not yet started 2016-10-20 13:26:42 7052 [Note] Plugin 'FEEDBACK' is disabled. 2016-10-20 13:26:42 7052 [Note] Server socket created on IP: '::'. 2016-10-20 13:26:42 7052 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections. Version: '10.1.10-MariaDB' socket: '' port: 3306 mariadb.org binary distribution InnoDB: Error: trying to access page number 1217926 in space 2075, InnoDB: space name mj2016/mj1, InnoDB: which is outside the tablespace bounds. InnoDB: Byte offset 0, len 16384, i/o type 10. InnoDB: If you get this error at mysqld startup, please check that InnoDB: your my.cnf matches the ibdata files that you have in the InnoDB: MySQL server. 2016-10-20 14:14:25 870 InnoDB: Assertion failure in thread 2160 in file fil0fil.cc line 5821 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 161020 14:14:25 [ERROR] mysqld got exception 0x80000003 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see http://kb.askmonty.org/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 10.1.10-MariaDB key_buffer_size=16777216 read_buffer_size=262144 max_used_connections=10 max_threads=1001 thread_count=8 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 787099 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x8190cd0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... mysqld.exe!my_parameter_handler() mysqld.exe!my_mb_ctype_mb() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!??2Geometry@@SAPAXIPAX@Z() mysqld.exe!?free_frm_image@TABLE_SHARE@@QAEXPBE@Z() mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z() mysqld.exe!?ha_open@handler@@QAEHPAUTABLE@@PBDHI@Z() mysqld.exe!?open_table_from_share@@YA?AW4open_frm_error@@PAVTHD@@PAUTABLE_SHARE@@PBDIIIPAUTABLE@@_N@Z() mysqld.exe!?open_table@@YA_NPAVTHD@@PAUTABLE_LIST@@PAVOpen_table_context@@@Z() mysqld.exe!?recover_from_failed_open@Open_table_context@@QAE_NXZ() mysqld.exe!?open_tables@@YA_NPAVTHD@@ABUDDL_options_st@@PAPAUTABLE_LIST@@PAIIPAVPrelocking_strategy@@@Z() mysqld.exe!?open_normal_and_derived_tables@@YA_NPAVTHD@@PAUTABLE_LIST@@II@Z() mysqld.exe!?send_data@select_result_text_buffer@@UAEHAAV?$List@VItem@@@@@Z() mysqld.exe!?get_all_tables@@YAHPAVTHD@@PAUTABLE_LIST@@PAVItem@@@Z() mysqld.exe!?get_schema_tables_result@@YA_NPAVJOIN@@W4enum_schema_table_state@@@Z() mysqld.exe!?exec_inner@JOIN@@QAEXXZ() mysqld.exe!?exec@JOIN@@QAEXXZ() mysqld.exe!?handle_select@@YA_NPAVTHD@@PAULEX@@PAVselect_result@@K@Z() mysqld.exe!??0Table_scope_and_contents_source_st@@QAE@ABU0@@Z() mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@@Z() mysqld.exe!?mysql_parse@@YAXPAVTHD@@PADIPAVParser_state@@@Z() mysqld.exe!?dispatch_command@@YA_NW4enum_server_command@@PAVTHD@@PADI@Z() mysqld.exe!?do_command@@YA_NPAVTHD@@@Z() mysqld.exe!?threadpool_process_request@@YAHPAVTHD@@@Z() mysqld.exe!?tp_end@@YAXXZ() KERNEL32.DLL!SetUserGeoID() ntdll.dll!TpReleaseTimer() ntdll.dll!TpReleaseTimer() KERNEL32.DLL!BaseThreadInitThunk() ntdll.dll!RtlSubscribeWnfStateChangeNotification() ntdll.dll!RtlSubscribeWnfStateChangeNotification()
這意味著您的 InnoDB 表有問題
您可以檢查幾種修復方法:
- 適用於所有情況 - 停止 MySQL,備份數據文件夾
- 執行
mysqlcheck
命令行實用程序- 如果它不修復添加到
my.ini
行innodb_force_recovery = XX
其中 XX = 1,2,3,4,5,6 從 1 開始如果沒有幫助增加 2,然後 3 等等(每次更改後重新啟動 MySQL)
與所有級別嘗試從表中選擇數據,成功時:
- 轉儲表
- 評論 innodb_force_recovery
- 刪除表
- 從備份恢復表
這就是我設法恢復我的數據庫的方式:
- 編輯 /
etc/my.cnf
並添加新行innodb_force_recovery = 6
- 啟動 MySQL 服務
- 備份所有數據:
mysql -p --all-databases > all.sql
- 停止 MySQL 服務並從
/etc/my.cnf
步驟 1 添加的行中刪除。- 刪除所有 MySQL 數據文件:
cd /var/lib/mysql rm -r *
- 啟動mysql服務
- 重新導入數據:
mysql <all/sql
重要提示:我確實嘗試將
innodb_force_recovery = X
where X is 1 設置為 5,但無法啟動 MySQL。只從 X = 6 開始。但我沒有嘗試使用 X = 0。所以我建議
innodb_force_recovery = 0
在執行上述過程之前嘗試啟動 MySQL。如果幸運的話,數據庫會自行修復。