SQLinfo.ru - Все о MySQL

Форум пользователей MySQL

Задавайте вопросы, мы ответим

Вы не зашли.

#1 09.12.2015 00:34:13

solovjev
Участник
Зарегистрирован: 08.12.2015
Сообщений: 2

Падение mysql после неправильного выключения

Вечер добрый, случилось недоброе - выключили свет и перестал запускаться mysql.
Пытался ставить "innodb_force_recovery = 2" как советует лог. Все запускается но ошибки в базе меня все равно не радуют.
Пробовал "mysqlcheck --repair  --all-databases --auto-repair -u username -p", после этого убираю "innodb_force_recovery" - и mysql снова не стартует. Как исправить это?

Кусок лога:

Код:

151208 17:58:15  InnoDB: Error: page 902 log sequence number 169713580
InnoDB: is in the future! Current system log sequence number 165318668.
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.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
151208 17:58:15  InnoDB: Error: page 4165 log sequence number 176880853
InnoDB: is in the future! Current system log sequence number 165318668.
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.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
151208 17:58:15  InnoDB: Assertion failure in thread 140271090988800 in file trx0purge.c line 840
InnoDB: Failing assertion: purge_sys->purge_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.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
14:58:15 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=16777216
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 = 346701 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 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x33)[0x7f93813e6793]
/usr/sbin/mysqld(handle_fatal_signal+0x3e4)[0x7f93812d3b44]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0)[0x7f9380ad18d0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7f937f4c9107]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f937f4ca4e8]
/usr/sbin/mysqld(+0x52aa65)[0x7f938142ca65]
/usr/sbin/mysqld(+0x52c32e)[0x7f938142e32e]
/usr/sbin/mysqld(+0x5f93c2)[0x7f93814fb3c2]
/usr/sbin/mysqld(+0x5ef5e7)[0x7f93814f15e7]
/usr/sbin/mysqld(+0x52d5d3)[0x7f938142f5d3]
/usr/sbin/mysqld(+0x51e4ac)[0x7f93814204ac]
/usr/sbin/mysqld(+0x522cb3)[0x7f9381424cb3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x80a4)[0x7f9380aca0a4]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f937f57a04d]
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.
151208 17:58:16 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

Неактивен

 

#2 09.12.2015 13:25:34

paulus
Администратор
MySQL Authorized Developer and DBA
Зарегистрирован: 22.01.2007
Сообщений: 6756

Re: Падение mysql после неправильного выключения

InnoDB не чинится repair, к сожалению. Если с force-recovery запускается, то можно вытянуть все данные в файлик (mysqldump -A -R > dump.sql), пересоздать базу (или как минимум удалить файлы innodb), а потом восстановить полученный бэкап с базой, запущенной без force-recovery (mysql < dump.sql).

Неактивен

 

#3 09.12.2015 15:13:29

solovjev
Участник
Зарегистрирован: 08.12.2015
Сообщений: 2

Re: Падение mysql после неправильного выключения

paulus написал:

InnoDB не чинится repair, к сожалению. Если с force-recovery запускается, то можно вытянуть все данные в файлик (mysqldump -A -R > dump.sql), пересоздать базу (или как минимум удалить файлы innodb), а потом восстановить полученный бэкап с базой, запущенной без force-recovery (mysql < dump.sql).

Спасибо огромное, так и сделал. Все заработало как нужно. Тьфу тьфу пока вроде не вижу что, что-то потерялось.

Неактивен

 

Board footer

Работает на PunBB
© Copyright 2002–2008 Rickard Andersson