Eu tenho um servidor web que está offline neste momento porque o MySQL falha ao iniciar com uma exceção. Não consigo encontrar a causa raiz do problema, mas tenho medo de que a corrupção do banco de dados trave o serviço MySQL.
Aqui estão as /var/log/mysql/mysqld.err
saídas:
==> /var/log/mysql/mysqld.err <==
2015-02-11 23:45:11 25171 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.
2015-02-11 23:45:11 25171 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-02-11 23:45:11 25171 [Note] InnoDB: The InnoDB memory heap is disabled
2015-02-11 23:45:11 25171 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-02-11 23:45:11 25171 [Note] InnoDB: Memory barrier is not used
2015-02-11 23:45:11 25171 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-02-11 23:45:11 25171 [Note] InnoDB: Using Linux native AIO
2015-02-11 23:45:11 25171 [Note] InnoDB: Using CPU crc32 instructions
2015-02-11 23:45:11 25171 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-02-11 23:45:11 25171 [Note] InnoDB: Completed initialization of buffer pool
2015-02-11 23:45:11 25171 [Note] InnoDB: Highest supported file format is Barracuda.
2015-02-11 23:45:11 25171 [Note] InnoDB: The log sequence numbers 43953950155 and 43953950155 in ibdata files do not match the log sequence number 43955508491 in the ib_logfiles!
2015-02-11 23:45:11 25171 [Note] InnoDB: Database was not shutdown normally!
2015-02-11 23:45:11 25171 [Note] InnoDB: Starting crash recovery.
2015-02-11 23:45:11 25171 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-02-11 23:45:11 25171 [Note] InnoDB: Restoring possible half-written data pages
2015-02-11 23:45:11 25171 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Last MySQL binlog file position 0 107020, file name ./mysqld-bin.000052
01:45:11 UTC - mysqld got signal 11 ;
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=262144
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 = 134417 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/sbin/mysqld(my_print_stacktrace+0x3c)[0x7f122fe0d18c]
/usr/sbin/mysqld(handle_fatal_signal+0x3c9)[0x7f122fc00c29]
/lib64/libpthread.so.0(+0x102b0)[0x7f122e4ef2b0]
/usr/sbin/mysqld(+0x792dd9)[0x7f122ff7bdd9]
/usr/sbin/mysqld(+0x799787)[0x7f122ff82787]
/usr/sbin/mysqld(+0x71a1bd)[0x7f122ff031bd]
/usr/sbin/mysqld(+0x66f175)[0x7f122fe58175]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x7f122fb65f41]
/usr/sbin/mysqld(+0x487c32)[0x7f122fc70c32]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x5fc)[0x7f122fc7425c]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x7cb)[0x7f122fb5e7eb]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f122db379f5]
/usr/sbin/mysqld(+0x36c3d8)[0x7f122fb553d8]
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.
Este acidente aconteceu em mysql-5.6.22
.
Alguma ideia do que está acontecendo?
Você tem um banco de dados (muito mal) corrompido, que está travando o mysql.
Como observação, isso deve acontecer apenas em casos raros, como congelamento do kernel ou perda de energia, juntamente com forçar innodb_flush_log_at_trx_commit para 2 ou usar um controlador RAID com cache de gravação forçado, mas sem bateria de backup.
Se você precisar recuperar os dados, tente iniciar o mysql com innodb_force_recovery definido como um valor diferente de zero - primeiro tente configurá-lo como 1, veja se o mysql inicia, se sim, faça um mysqldump do banco de dados; se um valor de 1 não ajudar, tente com 2 e assim por diante.
Mais detalhes estão na documentação do mysql:
http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html