服务器断电mysql启动失败问题

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_43025071/article/details/89948369

启动mysql错误日志如下:

190507 18:43:29 mysqld_safe Starting mysqld daemon with databases from /data/MySQL_Data/
2019-05-07 18:43:29 7470 [Note] Plugin 'FEDERATED' is disabled.
2019-05-07 18:43:29 7470 [Note] InnoDB: Using atomics to ref count buffer pool pages
2019-05-07 18:43:29 7470 [Note] InnoDB: The InnoDB memory heap is disabled
2019-05-07 18:43:29 7470 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-05-07 18:43:29 7470 [Note] InnoDB: Memory barrier is not used
2019-05-07 18:43:29 7470 [Note] InnoDB: Compressed tables use zlib 1.2.3
2019-05-07 18:43:29 7470 [Note] InnoDB: Using CPU crc32 instructions
2019-05-07 18:43:29 7470 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-05-07 18:43:29 7470 [Note] InnoDB: Completed initialization of buffer pool
2019-05-07 18:43:29 7470 [Note] InnoDB: Highest supported file format is Barracuda.
2019-05-07 18:43:29 7470 [Note] InnoDB: Log scan progressed past the checkpoint lsn 32043639287
2019-05-07 18:43:29 7470 [Note] InnoDB: Database was not shutdown normally!
2019-05-07 18:43:29 7470 [Note] InnoDB: Starting crash recovery.
2019-05-07 18:43:29 7470 [Note] InnoDB: Reading tablespace information from the .ibd files...
2019-05-07 18:43:29 7470 [Note] InnoDB: Restoring possible half-written data pages 
2019-05-07 18:43:29 7470 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 32043826007
2019-05-07 18:43:29 7470 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 2019-05-07 18:43:29 7f9d0db71700  InnoDB: Assertion failure in thread 140312516695808 in file log0recv.cc line 1159
InnoDB: Failing assertion: !page || (ibool)!!page_is_comp(page) == dict_table_is_comp(index->table)
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.
10:43:29 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=8388608
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 = 68241 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...
56 57 stack_bottom = 0 thread_stack 0x40000
58 59 60 61 62 /usr/local/mysql/bin/mysqld(my_print_stacktrace+0x35)[0x8e59b5]
63 64 65 /usr/local/mysql/bin/mysqld(handle_fatal_signal+0x41b)[0x6529db]
/lib64/libpthread.so.0[0x3854c0f7e0]
/lib64/libc.so.6(gsignal+0x35)[0x3854432495]
66 /lib64/libc.so.6(abort+0x175)[0x3854433c75]
67 68 69 70 71 /usr/local/mysql/bin/mysqld[0x989837]
72 73 74 75 /usr/local/mysql/bin/mysqld[0x98b9eb]
76 77 78 79 /usr/local/mysql/bin/mysqld[0xa4e518]
80 81 82 83 84 /usr/local/mysql/bin/mysqld[0xa8d1ce]
85 86 87 88 /usr/local/mysql/bin/mysqld[0x9fe6e8]
/lib64/libpthread.so.0[0x3854c07aa1]
89 /lib64/libc.so.6(clone+0x6d)[0x38544e8bcd]
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.
190507 18:43:29 mysqld_safe mysqld from pid file /data/MySQL_Data//localhost.localdomain.pid ended

问题分析:应该是数据在断电的时候可能造成innodb数据损坏试着将数据存放目录下ib_logfile0  ib_logfile1两个日志文件做好备份删除掉(先把数据和配置文件备份一下防止乱弄把数据全弄坏了 然后再用副本试着恢复)。重启mysql能启动了,不过是一会就会出现原来的问题。继续查看错误日志

错误如下:

InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2019-05-07 20:18:49 7f9538cb6720 InnoDB: Error: page 377 log sequence number 1234631105
InnoDB: is in the future! Current system log sequence number 1651734.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2019-05-07 20:18:49 7f9538cb6720 InnoDB: Error: page 12 log sequence number 25102656673
InnoDB: is in the future! Current system log sequence number 1651734.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2019-05-07 20:18:49 7f9538cb6720 InnoDB: Error: page 614 log sequence number 25102656673
InnoDB: is in the future! Current system log sequence number 1651734.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2019-05-07 20:18:49 24168 [Note] InnoDB: Waiting for purge to start
2019-05-07 20:18:49 7f950d86d700  InnoDB: Assertion failure in thread 140278153795328 in file trx0purge.cc line 699
InnoDB: Failing assertion: purge_sys->iter.trx_no <= purge_sys->rseg->last_trx_no
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.
12:18:49 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=8388608
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 = 68241 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/local/mysql/bin/mysqld(my_print_stacktrace+0x35)[0x8e59b5]
/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x41b)[0x6529db]
/lib64/libpthread.so.0[0x3854c0f7e0]
/lib64/libc.so.6(gsignal+0x35)[0x3854432495]
/lib64/libc.so.6(abort+0x175)[0x3854433c75]
/usr/local/mysql/bin/mysqld[0xa09a92]
/usr/local/mysql/bin/mysqld[0xa0a5f4]
/usr/local/mysql/bin/mysqld[0xa0af03]
/usr/local/mysql/bin/mysqld[0x9fcbf6]
/lib64/libpthread.so.0[0x3854c07aa1]
/lib64/libc.so.6(clone+0x6d)[0x38544e8bcd]
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.
190507 20:18:49 mysqld_safe mysqld from pid file /data/MySQL_Data/localhost.localdomain.pid ended

innoDB是可以启动的,说日志序列号和ibdata文件中的不匹配!继续删除数据存放目录下ibdata1文件(删除前做好备份)

执行service mysqld start 启动正常……

启动完毕后之前的数据库会有问题,需要重新把备份的数据重新还原下就好了

展开阅读全文

CentOS5.5装mysql服务器启动失败

07-03

CentOS5.5装mysql服务器第一次就启动失败rn启动提示下面错误 service mysqld startrnrnStarting MySQL.Manager of pid-file quit without updating firnrn1 。my.cnf里面 log-bin 注释了 rnrn2 。权限修改rnchmod 777 /etc/rc.d/init.d/mysqldrnrnchmod 777 /var/lib/mysqlrnrn3 。skip-federated 也注释掉了rnrn4 。selinux 也是关闭的rnrn5 。ps -A|grep mysql 没有任何进程rnrn6 。data/mysql-bin.index 我根本没有这个文件啊rnrn7 。yum -y libstdc++.so.5 也没有效果rnrn日志文件信息rn110703 14:17:50 mysqld startedrn/usr/local/mysql/bin/mysqld: /usr/local/mysql/bin/mysqld: cannot execute binary filern110703 14:17:50 mysqld endedrnrn我的配置文件是这样的 大家请看rn# cd /usr/local/srcrn# tar zxvf mysql-5.0.86-linux-i686-icc-glibc23.tar.gzrn# mv mysql-5.0.86-linux-i686-icc-glibc23 /usr/local/ rn# ln -s /usr/local/mysql-5.0.86-linux-i686-icc-glibc23/ /usr/local/mysqlrn# groupadd mysqlrn# useradd -g mysql mysql -d /home/mysql -s /sbin/nologinrn# chown -R mysql:mysql /usr/local/mysqlrn# chown -R mysql:mysql /usr/local/mysql-5.0.86-linux-i686-icc-glibc23/rn# cd /usr/local/mysqlrn# ./scripts/mysql_install_db --user=mysqlrn# cp ./support-files/mysql.server /etc/rc.d/init.d/mysqldrn# chmod 755 /etc/rc.d/init.d/mysqldrn# chkconfig --add mysqldrn# chkconfig --level 3 mysqld onrn# cp ./support-files/my-huge.cnf /etc/my.cnfrn# mv /usr/local/mysql/data /var/lib/mysqlrn# chown -R mysql:mysql /var/lib/mysqlrnrnrn有没有谁知道是怎么回事吗?rn 论坛

关于mysql启动失败问题

01-03

我一般使用mysql绿色版。在dos环境下进入bin目录,使用命令mysqld -nt --skip-grant-tables 启动mysql,关闭权限的检查rn忽然有一天,这个命令不能使用了。。。rn错误如下rnrnrnrnF:\game\mysql\bin>mysqld -nt --skip-grant-tablesrn2015-01-03 09:59:41 0 [Warning] option 'new': boolean value 't' wasn't recognizernd. Set to OFF.rn2015-01-03 09:59:41 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecarnted. Please use --explicit_defaults_for_timestamp server option (see documentatirnon for more details).rn2015-01-03 09:59:41 3728 [ERROR] Can't find messagefile 'C:\Program Files\myeye\rnmysql5\share\errmsg.sys'rn2015-01-03 09:59:41 3728 [Warning] Can't create test file C:\Program Files\myeyern\mysql5\Data\www-a2cff407694.lower-testrn2015-01-03 09:59:41 3728 [Warning] Can't create test file C:\Program Files\myeyern\mysql5\Data\www-a2cff407694.lower-testrnmysqld: Can't change dir to 'C:\Program Files\myeye\mysql5\Data\' (Errcode: 2 -rnNo such file or directory)rn2015-01-03 09:59:41 3728 [ERROR] Abortingrnrn2015-01-03 09:59:41 3728 [Note] Binlog endrn2015-01-03 09:59:41 3728 [Note]rnrn我做了两个操作。一个是检查是否端口被占用。netstat -ano|findstr "3306" 显示没有rn 第二就是换了配置文件。但是还是没有反应。rnrn求大神指导。什么原因。还有上面提示c盘的目录不知道做什么的。好像没有关系。。。rn我在其它电脑上都没有问题。求指导。。。 论坛

没有更多推荐了,返回首页