1

I have a Linux Gentoo server which has OwnCloud application installed. It works for about 2 months with out any problems, and sudden this morning MySQL died. I have tried to restart mysql server and in mysqld.err log file a have this:

2015-04-16 21:39:59 28987 [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-04-16 21:39:59 28987 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-04-16 21:39:59 28987 [Note] InnoDB: The InnoDB memory heap is disabled
2015-04-16 21:39:59 28987 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-04-16 21:39:59 28987 [Note] InnoDB: Memory barrier is not used
2015-04-16 21:39:59 28987 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-04-16 21:39:59 28987 [Note] InnoDB: Using Linux native AIO
2015-04-16 21:39:59 28987 [Note] InnoDB: Using CPU crc32 instructions
2015-04-16 21:39:59 28987 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-04-16 21:39:59 28987 [Note] InnoDB: Completed initialization of buffer pool
2015-04-16 21:39:59 28987 [Note] InnoDB: Highest supported file format is Barracuda.
2015-04-16 21:39:59 28987 [Note] InnoDB: The log sequence numbers 50092945 and 50092945 in ibdata files do not match the log sequence number 447541274 in the ib_logfiles!
2015-04-16 21:39:59 28987 [Note] InnoDB: Database was not shutdown normally!
2015-04-16 21:39:59 28987 [Note] InnoDB: Starting crash recovery.
2015-04-16 21:39:59 28987 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-04-16 21:39:59 28987 [Note] InnoDB: Restoring possible half-written data pages
2015-04-16 21:39:59 28987 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Last MySQL binlog file position 0 106756973, file name ./mysqld-bin.000032
18:39:59 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+0x29)[0x857f39]
/usr/sbin/mysqld(handle_fatal_signal+0x350)[0x628700]
/lib64/libpthread.so.0(+0x11260)[0x7f27d6403260]
/usr/sbin/mysqld[0x9a643a]
/usr/sbin/mysqld[0x9a744b]
/usr/sbin/mysqld[0x920e29]
/usr/sbin/mysqld[0x8692f7]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x58c251]
/usr/sbin/mysqld[0x6a131a]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x7b8)[0x6a4238]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x749)[0x5848a9]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f27d5a71db5]
/usr/sbin/mysqld[0x57a935]
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.

After searching and try everything I found on internet, including copying the database to another Linux server, I still cannot start mysql server.

I have even copied the entire database to an windows 7 OS with XAMPP MySQL server and when I try to start the MySQL server it give me the message "Application encountered an error and need to close", refering to mysqld.exe

How can I repair this database and make MySql server running again?

I want to mention that I'm not using any replication, regarding the first warning in mysqld.err file, so not problem there.

  • How did you "copy the database"? What version was it? – Rick James Apr 17 '15 at 0:57
  • I have copied the content of /var/lib/mysql/ directory to another server. Mysql version is 5.6.23 – koAndy Apr 17 '15 at 5:19
  • 5.6.23 on both machines? – Rick James Apr 17 '15 at 18:59
0

This entry in the log seems to indicate a possible corruption problem with mysqld-bin.000032. Those mysql bin files are part of the MySQL binary log process. They were probably being used for replication or for point-in-time backups.

InnoDB: Last MySQL binlog file position 0 106756973, file name ./mysqld-bin.000032

18:39:59 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.

So whereever you move the /var/lib/mysql directory, you are also brining along the mysqld-bin files. Which would explain why changing servers doesn't help.

Try moving those mysqld-bin files to another location so MySQL can complete the recovery process.

Update

In the my.cnf file under the [mysqld] section.

Remove:

log-bin variable from my.cnf it is present

Add:

innodb_force_recovery=4

Restart MySQL and let me know. There are additional steps to take to completely restore MySQL, if your innodb tablespace is truly corrupt.

  • I moved all mysqld-bin.* files to another location, outside mysql database folder. Now folder /var/lib/mysql contains only 4 folders: mysql, owncloud, performance_schema, test and 3 files, ib_logfile0, ib_logfile_1, iddata1. I try starting mysql server and the mysql.err file contains exact same error, with mysqld-bin.000032 file complain. – koAndy Apr 20 '15 at 13:45
  • Hello @koAndy, updated my answer – Craig Efrein Apr 20 '15 at 13:58
  • Removing log-bin from my.cnf solved the problem! Thank you! – koAndy Apr 20 '15 at 14:08
  • Hi @koAndy, glad that worked! – Craig Efrein Apr 20 '15 at 14:08
  • did you add innodb_force_recovery=4 also? and removed log_bin? – kasi Mar 17 '16 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.