开发者社区> 问答> 正文

mysql 异常停止后无法启动?报错

      诸位好,我的mysql在还原数据时,异常停止,然后就无法启动....

      尝试各种方法无果后,决定重装(是个备份服务器....)

      步骤是:

      yum remove mysqsl*

      然后安装

      yum install mysql

      yum install mysql-server

      然后我仍旧启动不了!!!!!!!

      @皮总 @红薯 @宏哥 @蟋蟀哥哥 @逝水fox 求助各位大神以及诸位万能的OSCER

      报错日志如下:

       

130906 16:10:59 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130906 16:10:59  InnoDB: Initializing buffer pool, size = 8.0M
130906 16:10:59  InnoDB: Completed initialization of buffer pool
InnoDB: Log scan progressed past the checkpoint lsn 21 273056542
130906 16:10:59  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 21 274094985
InnoDB: Error: trying to access page number 715789170 in space 0,
InnoDB: space name ./ibdata1,
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.
130906 16:10:59  InnoDB: Assertion failure in thread 140427302070240 in file fil/fil0fil.c line 4135
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.1/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
08:10:59 UTC - mysqld got signal 6 ;
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.
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.

key_buffer_size=8384512
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338332 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
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...
stack_bottom = 0 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x29) [0x84f539]
/usr/libexec/mysqld(handle_fatal_signal+0x483) [0x6a3713]
/lib64/libpthread.so.0() [0x3fefa0f4a0]
/lib64/libc.so.6(gsignal+0x35) [0x3fef232885]
/lib64/libc.so.6(abort+0x175) [0x3fef234065]
/usr/libexec/mysqld(fil_io+0x36e) [0x766ede]
/usr/libexec/mysqld() [0x74ed43]
/usr/libexec/mysqld(buf_read_page+0x225) [0x74f785]
/usr/libexec/mysqld(buf_page_get_gen+0x393) [0x748c63]
/usr/libexec/mysqld(trx_undo_lists_init+0x42d) [0x7df32d]
/usr/libexec/mysqld() [0x7d5579]
/usr/libexec/mysqld(trx_rseg_list_and_array_init+0xaf) [0x7d57af]
/usr/libexec/mysqld(trx_sys_init_at_db_start+0x160) [0x7d6650]
/usr/libexec/mysqld(innobase_start_or_create_for_mysql+0x11fb) [0x7c712b]
/usr/libexec/mysqld() [0x72eacb]
/usr/libexec/mysqld(ha_initialize_handlerton(st_plugin_int*)+0x31) [0x6971f1]
/usr/libexec/mysqld() [0x7169cb]
/usr/libexec/mysqld(plugin_init(int*, char**, int)+0x6e4) [0x718cc4]
/usr/libexec/mysqld() [0x5bef52]
/usr/libexec/mysqld(main+0x1b3) [0x5c1843]
/lib64/libc.so.6(__libc_start_main+0xfd) [0x3fef21ecdd]
/usr/libexec/mysqld() [0x5097f9]
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.
130906 16:10:59 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

展开
收起
爱吃鱼的程序员 2020-06-22 16:56:25 760 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    Ifyougetthiserroratmysqldstartup,pleasecheckthatyourmy.cnfmatchestheibdatafilesthatyouhaveintheMySQLserver.

    先拿这句Google吧

    好的,谢谢,刚刚没google这个

    把 key_buffer_size+(read_buffer_size+sort_buffer_size)*max_threads= 338332  K 几个参数调小一点,再启动试试

    谢谢皮总,皮总永远都在我们身边指引着我们呢...

    问题解决,先将方法汇总如下:

    • 'cd'into/var/lib/mysql

    • Createatmpdir:mkdirold

    • Movetheibdatarelatedfilesintoit:mvib*old

    • NowtrystartingupMySQL:/etc/init.d/mysqlstart

    参考网址: http://serverfault.com/questions/74968/recovering-a-mysql-database-when-the-mysql-server-will-not-start

    删除的ibdata是什么文件?删除掉data目录下的所有非目录文件.也就是那些缓存文件.谢谢
    2020-06-22 16:56:42
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像