Hello. MySQL does not start, I do restart through service mysql restart I get the following:

ERROR! MySQL server PID file could not be found! Starting MySQL. ERROR! ERROR! Failed to restart server. 

The following appears in the error log:

 160626 07:23:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2016-06-26 7:23:44 139672214771744 [Note] /usr/sbin/mysqld (mysqld 10.1.13-MariaDB) starting as process 1631 ... 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: The InnoDB memory heap is disabled 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Memory barrier is not used 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Using Linux native AIO 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Using SSE crc32 instructions 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Initializing buffer pool, size = 256.0M 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Completed initialization of buffer pool 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Highest supported file format is Barracuda. 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Log scan progressed past the checkpoint lsn 2779780504 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Database was not shutdown normally! 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Starting crash recovery. 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Reading tablespace information from the .ibd files... 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Restoring possible half-written data pages 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: from the doublewrite buffer... InnoDB: Doing recovery: scanned up to log sequence number 2779794489 2016-06-26 7:23:44 139672214771744 [Note] InnoDB: Starting an apply batch of log records to the database... InnoDB: Progress in percent: 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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 2016-06-26 07:23:45 7f07c2bfc700 InnoDB: Assertion failure in thread 139671308846848 in file log0recv.cc line 1195 96 97 98 99 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. 160626 7:23:45 [ERROR] 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. To report this bug, see https://mariadb.com/kb/en/reporting-bugs 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. Server version: 10.1.13-MariaDB key_buffer_size=268435456 read_buffer_size=1048576 max_used_connections=0 max_threads=153 thread_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 578601 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x0 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 = 0x0 thread_stack 0x48400 /usr/sbin/mysqld(my_print_stacktrace+0x2b)[0x7f07f966ee0b] /usr/sbin/mysqld(handle_fatal_signal+0x475)[0x7f07f91cf055] /lib64/libpthread.so.0(+0x3d6700f7e0)[0x7f07f87d57e0] /lib64/libc.so.6(gsignal+0x35)[0x7f07f6bfc625] /lib64/libc.so.6(abort+0x175)[0x7f07f6bfde05] mysys/stacktrace.c:247(my_print_stacktrace)[0x7f07f937d7cf] log/log0recv.cc:1751(recv_recover_page_func(unsigned long, buf_block_t*))[0x7f07f9380034] buf/buf0buf.cc:4820(buf_page_io_complete(buf_page_t*))[0x7f07f948183a] fil/fil0fil.cc:6084(fil_aio_wait(unsigned long))[0x7f07f94dc7f8] srv/srv0start.cc:543(io_handler_thread)[0x7f07f940db10] /lib64/libpthread.so.0(+0x3d67007aa1)[0x7f07f87cdaa1] /lib64/libc.so.6(clone+0x6d)[0x7f07f6cb293d] 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. 160626 07:23:45 mysqld_safe mysqld from pid file /var/lib/mysql/ovz1.valerka2.zm9y1.vps.jino.ru.pid ended 

Rummaged all Google, did not find a similar problem. Thanks in advance for your help.

  • Is this a fresh installation or has MySQL been working for some time? Put from a package or collected MySQL? Maybe this event was preceded by some work with MySQL? - cheops
  • Worked before restoring from server backup. And what is interesting is that after restoring MySQL it seems to be working, you can go into phpMyAdmin, but if you take any actions, such as deleting tables, it immediately falls off. I installed it from the package and updated MySQL to the latest version. - Anton Morozov
  • How to restore? Did you deploy a dump? Used some kind of utility that works with binary data? - cheops
  • Standard hosting panel tools. It is possible that the problem is precisely because of this, but I would like to understand why this happened. - Anton Morozov

1 answer 1

You have a damaged InnoDB tablespace. The fact is that InnoDB tables and indexes are stored in a single large file (which can be broken into several), which in turn is mapped into memory. InnoDB is rather complicated, because it was written as a replacement for Oracle, and at a time when Linux was not very stable.

The most reliable way to restore is to work with a dump: honestly remove the SQL-dump, honestly restore it. However, this can be quite time-consuming surgery. There are utilities that work directly with the table space, allowing you to copy binary files. It is very likely that your dump was restored using this utility. Perhaps it was not updated following the version of MySQL or the dumps created were for the previous version of MySQL and the table space binary files are not suitable for the new version.

In any case, you should immediately contact the hosting technical support service for help, as only they have complete information.

  • Thank you very much for the clarification. - Anton Morozov