数据库启动成功之后,使用sqlyog 连接直接报错,mysql停止运行了,查看日志报错是这个:
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.
2015-12-14 12:11:17 17f0 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.
2015-12-14 12:11:17 6128 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2015-12-14 12:11:17 6128 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-14 12:11:17 6128 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-12-14 12:11:17 6128 [Note] InnoDB: Memory barrier is not used
2015-12-14 12:11:17 6128 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-14 12:11:17 6128 [Note] InnoDB: Not using CPU crc32 instructions
2015-12-14 12:11:17 6128 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2015-12-14 12:11:17 6128 [Note] InnoDB: Completed initialization of buffer pool
2015-12-14 12:11:17 6128 [Note] InnoDB: Highest supported file format is Barracuda.
2015-12-14 12:11:17 6128 [Note] InnoDB: The log sequence numbers 20657755 and 20657755 in ibdata files do not match the log sequence number 42782346927 in the ib_logfiles!
2015-12-14 12:11:17 6128 [Note] InnoDB: Database was not shutdown normally!
2015-12-14 12:11:17 6128 [Note] InnoDB: Starting crash recovery.
2015-12-14 12:11:17 6128 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-12-14 12:11:17 6128 [Note] InnoDB: Restoring possible half-written data pages
2015-12-14 12:11:17 6128 [Note] InnoDB: from the doublewrite buffer...
2015-12-14 12:11:17 6128 [Note] InnoDB: 128 rollback segment(s) are active.
2015-12-14 12:11:17 6128 [Note] InnoDB: Waiting for purge to start
2015-12-14 12:11:17 6128 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 42782346927
2015-12-14 12:11:17 10452 [Note] InnoDB: Dumping buffer pool(s) not yet started
2015-12-14 12:11:17 6128 [Note] Plugin 'FEEDBACK' is disabled.
2015-12-14 12:11:17 6128 [Note] Recovering after a crash using tc.log
2015-12-14 12:11:17 6128 [Note] Starting crash recovery...
2015-12-14 12:11:17 6128 [Note] Crash recovery finished.
2015-12-14 12:11:17 6128 [Note] Server socket created on IP: '::'.
2015-12-14 12:11:17 6128 [Note] Event Scheduler: Loaded 0 events
2015-12-14 12:11:17 6128 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.8-MariaDB' socket: '' port: 3306 mariadb.org binary distribution
InnoDB: Error: trying to access page number 243016 in space 126,
InnoDB: space name appstoreus/tagapps,
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.
2015-12-14 12:11:23 3b0c InnoDB: Assertion failure in thread 15116 in file fil0fil.cc line 5820
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.
151214 12:11:23 [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.8-MariaDB
key_buffer_size=33554432
read_buffer_size=65536
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 = 628575 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x11a6f840
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!??0Global_read_lock@@QAE@XZ()
mysqld.exe!??0Global_read_lock@@QAE@XZ()
mysqld.exe!?store_record_for_lookup@Stat_table@@IAEXXZ()
mysqld.exe!??0Global_read_lock@@QAE@XZ()
mysqld.exe!??0Global_read_lock@@QAE@XZ()
mysqld.exe!??0Global_read_lock@@QAE@XZ()
mysqld.exe!?store_record_for_lookup@Stat_table@@IAEXXZ()
mysqld.exe!?store_record_for_lookup@Stat_table@@IAEXXZ()
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!RtlpUnWaitCriticalSection()
ntdll.dll!EtwNotificationRegister()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUnicodeStringToInteger()
ntdll.dll!RtlUnicodeStringToInteger()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x11a87740): show create table `appstoreus`.`tagapps`
Connection ID (thread ID): 4
Status: NOT_KILLED
参考文献的解决办法:
首先备份所有的数据库文件
删除mysql安装目录下面的日志文件:
对应目录 mysql\data 的文件:ibdata1
然后重新启动mysql,之前的数据都没了,需要使用上面的备份恢复。
如果大家也遇到一样的问题,解决的比较好的,请告诉我一下。