How to fix corupted MySQL installation - mysql

Due to some issues with the server, a number of InnoDB database folders with ibd, frm and TRN files were deleted (only affects databases not really needed anymore). Currently MySQL service starts only with the following setting:
innodb_force_recovery = 5
Then it crashes every few seconds, here's an extract from the log file
2022-10-11 17:38:54 27975 [Note] InnoDB: 1.2.10 started; log sequence number 313646609430
2022-10-11 17:38:54 27975 [Note] InnoDB: !!! innodb_force_recovery is set to 5 !!!
2022-10-11 17:38:54 27975 [Note] Server hostname (bind-address): '*'; port: 3306
2022-10-11 17:38:54 27975 [Note] IPv6 is available.
2022-10-11 17:38:54 27975 [Note] - '::' resolves to '::';
2022-10-11 17:38:54 27975 [Note] Server socket created on IP: '::'.
2022-10-11 17:38:54 27975 [Note] Event Scheduler: Loaded 0 events
2022-10-11 17:38:54 27975 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.10' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
2022-10-11 17:38:55 7f1d2c06a700 InnoDB: Error: page 4087 log sequence number 315137164614
InnoDB: is in the future! Current system log sequence number 313646609430.
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.
2022-10-11 17:38:55 27975 [ERROR] InnoDB: Failed to find tablespace for table '"wp_website"."wp_options"' in the cache. Attempting to load the tablespace with space id 34249.
2022-10-11 17:38:55 27975 [Warning] InnoDB: Allocated tablespace 34249, old maximum was 0
2022-10-11 17:38:55 7f1d2c06a700 InnoDB: Error: page 252899 log sequence number 471118864984
InnoDB: is in the future! Current system log sequence number 313646609430.
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.
2022-10-11 17:38:55 7f1d2c06a700 InnoDB: Error: page 85552 log sequence number 471118895771
InnoDB: is in the future! Current system log sequence number 313646609430.
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.
2022-10-11 17:38:55 7f1d2c06a700 InnoDB: Error: page 147803 log sequence number 471118895778
InnoDB: is in the future! Current system log sequence number 313646609430.
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.
2022-10-11 17:38:55 7f1d2c06a700 InnoDB: Error: page 4 log sequence number 470722597051
InnoDB: is in the future! Current system log sequence number 313646609440.
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.
2022-10-11 17:38:55 7f1d2c06a700 InnoDB: Error: page 13 log sequence number 315130852444
InnoDB: is in the future! Current system log sequence number 313646609440.
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.
2022-10-11 17:38:55 7f1d2c06a700 InnoDB: Error: page 3 log sequence number 315130852367
InnoDB: is in the future! Current system log sequence number 313646609440.
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.
2022-10-11 17:38:55 7f1d2c06a700 InnoDB: Error: page 22 log sequence number 315133587106
InnoDB: is in the future! Current system log sequence number 313646609440.
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.
InnoDB: A new raw disk partition was initialized or
InnoDB: innodb_force_recovery is on: we do not allow
InnoDB: database modifications by the user. Shut down
InnoDB: mysqld and edit my.cnf so that newraw is replaced
InnoDB: with raw, and innodb_force_... is removed.
14:38:55 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=8388608
read_buffer_size=131072
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68216 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x1d46900
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 = 7f1d2c069e18 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x35)[0x8bfd45]
/usr/sbin/mysqld(handle_fatal_signal+0x4a4)[0x65b074]
/lib64/libpthread.so.0[0x34c700f7e0]
/usr/sbin/mysqld[0x9a45b2]
/usr/sbin/mysqld[0x97e382]
/usr/sbin/mysqld[0x943807]
/usr/sbin/mysqld[0x9a236d]
/usr/sbin/mysqld[0x9a2bfd]
/usr/sbin/mysqld[0x8e1729]
/usr/sbin/mysqld(_Z15ha_rollback_lowP3THDb+0x87)[0x5a27a7]
/usr/sbin/mysqld(_Z17ha_rollback_transP3THDb+0x4c)[0x5a256c]
/usr/sbin/mysqld(_Z19trans_rollback_stmtP3THD+0x29)[0x764a19]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x23d)[0x6d2fdd]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x32f)[0x6d7a5f]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xe28)[0x6d8978]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0xcf)[0x6a682f]
/usr/sbin/mysqld(handle_one_connection+0x47)[0x6a6957]
/usr/sbin/mysqld(pfs_spawn_thread+0x139)[0xadc7d9]
/lib64/libpthread.so.0[0x34c7007aa1]
/lib64/libc.so.6(clone+0x6d)[0x34c6ce8c4d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f1d04004f30): is an invalid pointer
Connection ID (thread ID): 1
Status: NOT_KILLED
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.
221011 17:38:55 mysqld_safe Number of processes running now: 0
221011 17:38:55 mysqld_safe mysqld restarted
How can I fix the problem? Or at least create the dumps of a few databases I need?

Related

mysql large tables (>4Gb) corrupt after local server restart

I hope someone can help me with this problem I'm having (I'm a newbie to Mysql and Stackoverflow, so it's probably something silly I'm missing)...
Whenever I build a large table in MySQL and then restart xampp's local MySQL server, the table then becomes unreadable under code runs that consider the 'whole' table - e.g. I can't drop it, run mySQLCheck on it or run any aggregation functions like sum / count.
This only happens after a server restart. It is fine when I build the table and then, without restarting, I run the 'whole table' codes on it I mentioned above.
Also, even after a server restart I can still do things like see the indexes in place, or sample the first x rows using Limit.
The error thrown is 'mysqld.exe has stopped working' - 'a problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available'
I stop and restart my server using the xampp start / stop control panel buttons
This only seems to happen when the table is more than 4gb. I'm using innodb
Thank you in advance!
Paul
===============================
An example of the error log result is below. This table (wikivisitstable10) was created by adding an index to the prior table. There are no crash issues with the prior table, just this one - and any similar tables >4gb:
`2016-08-25 0:22:57 6804 [Warning] option
'innodb-max-dirty-pages-pct': value 0 adjusted to 0.001
2016-08-25 0:22:57 6804 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-08-25 0:22:57 6804 [Note] InnoDB: The InnoDB memory heap is disabled
2016-08-25 0:22:57 6804 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2016-08-25 0:22:57 6804
[Note] InnoDB: Memory barrier is not used 2016-08-25 0:22:57 6804
[Note] InnoDB: Compressed tables use zlib 1.2.3
2016-08-25 0:22:57 6804 [Note] InnoDB: Using generic crc32 instructions
2016-08-25 0:22:57 6804 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-08-25 0:22:57 6804 [Note] InnoDB: Completed initialization of
buffer pool
2016-08-25 0:22:57 6804 [Note] InnoDB: Highest supported
file format is Barracuda.
2016-08-25 0:22:57 6804 [Note] InnoDB: The log sequence numbers 400931068139 and 400931068139 in ibdata files do not match the log sequence number 400931068159 in the ib_logfiles!
2016-08-25 0:22:57 6804 [Note] InnoDB: Database was not shutdown
normally!
2016-08-25 0:22:57 6804 [Note] InnoDB: Starting crash
recovery.
2016-08-25 0:22:57 6804 [Note] InnoDB: Reading tablespace
information from the .ibd files...
2016-08-25 0:22:58 6804 [Note] InnoDB: Restoring possible half-written data pages
2016-08-25 0:22:58 6804 [Note] InnoDB: from the doublewrite buffer...
2016-08-25 00:22:59 1a94 InnoDB: Error: table 'revil2/page'
InnoDB: in InnoDB data dictionary has tablespace id 180, InnoDB: but a tablespace with that id does not exist. There is InnoDB: a tablespace of name revil2/page and id 181, though. Have InnoDB: you deleted or moved .ibd files?
InnoDB: Please refer to InnoDB: DATADICT LINK (REMOVED)
InnoDB: for how to resolve the issue.
2016-08-25 0:22:59 6804 [ERROR] InnoDB: Table revil2/wikipages7 in the InnoDB data dictionary has tablespace id 175, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to InnoDB: DATA DICT LINK (REMOVED)
InnoDB: for how to resolve the issue.
2016-08-25 0:22:59 6804 [Note] InnoDB: 128 rollback segment(s) are active.
2016-08-25 0:22:59 6804 [Note] InnoDB: Waiting for purge to start
2016-08-25 0:22:59 6804 [Note] InnoDB: Percona XtraDB (PERCONA
WEBSITE (REMOVED)) 5.6.28-76.1 started; log sequence number
400931068159
2016-08-25 0:22:59 5820 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-08-25 00:22:59 16bc InnoDB: Loading buffer pool(s) from .\\ib_buffer_pool
2016-08-25 0:22:59 6804 [Note] Plugin 'FEEDBACK' is disabled.
2016-08-25 0:22:59 6804 [Note] Server socket created on IP: '::'.
2016-08-25 00:22:59 16bc InnoDB: Buffer pool(s) load completed at 160825 0:22:59
2016-08-25 0:23:00 6804 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections. Version: '10.1.13-MariaDB' socket: '' port: 3306 mariadb.org binary distribution
InnoDB: Error: trying to access page number 1794 in space 299, InnoDB: space name revil2/wikivisitstable10, InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that InnoDB: your my.cnf matches the ibdata files that you have in the InnoDB: MySQL server.
2016-08-25 00:23:46 1388 InnoDB: Assertion failure in thread 5000 in file fil0fil.cc line 5866
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: FORCING INNODB RECOVERY LINK (REMOVED)
InnoDB: about forcing recovery. 160825 0:23:46
[ERROR] mysqld got exception 0x80000003 ; 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.
Server version: 10.1.13-MariaDB
key_buffer_size=268435456
read_buffer_size=268435456
max_used_connections=1
max_threads=1001
thread_count=1
It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 788380 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x1c172e20 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...
mysqld.exe!my_parameter_handler() mysqld.exe!my_mb_ctype_mb()
mysqld.exe!?get_ctx#MDL_ticket##QBEPAVMDL_context##XZ()
mysqld.exe!?get_ctx#MDL_ticket##QBEPAVMDL_context##XZ()
mysqld.exe!?functype#Item_func_dyncol_create##UBE?AW4Functype#Item_func##XZ()
mysqld.exe!?get_ctx#MDL_ticket##QBEPAVMDL_context##XZ()
mysqld.exe!?get_ctx#MDL_ticket##QBEPAVMDL_context##XZ()
mysqld.exe!?get_trg_event_map#Update_rows_log_event##UAEEXZ()
mysqld.exe!?ha_check#handler##QAEHPAVTHD##PAUst_ha_check_opt###Z()
mysqld.exe!??_9handler##$BBAE#AE()
mysqld.exe!?execute#Sql_cmd_check_table##UAE_NPAVTHD###Z()
mysqld.exe!?mysql_execute_command##YAHPAVTHD###Z()
mysqld.exe!?mysql_parse##YAXPAVTHD##PADIPAVParser_state###Z()
mysqld.exe!?dispatch_command##YA_NW4enum_server_command##PAVTHD##PADI#Z()
mysqld.exe!?do_command##YA_NPAVTHD###Z()
mysqld.exe!?threadpool_process_request##YAHPAVTHD###Z()
mysqld.exe!?tp_end##YAXXZ() KERNEL32.DLL!SetUserGeoID()
ntdll.dll!TpSimpleTryPost() ntdll.dll!EtwNotificationRegister()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlUnicodeStringToInteger()
ntdll.dll!RtlUnicodeStringToInteger()
Trying to get some variables. Some pointers may be invalid and cause
the dump to abort. Query (0x1c232750): CHECK TABLE
`wikivisitstable10` Connection ID (thread ID): 2 Status: NOT_KILLED`
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on

MySQL wont start - Database crashed and now I get Error 1067

We have a MySQL database and last night there was a power outage which caused the machine it runs under to crash.
Now with the machine restarted, I am trying to run the MySQL service and I get the error:
"Error 1067: The process terminated unexpectedly"
Extract from the log:
2015-12-14 08:56:17 1248 [Note] Plugin 'FEDERATED' is disabled.
2015-12-14 08:56:17 1248 [Warning] option 'innodb-autoextend-increment': unsigned value 67108864 adjusted to 1000
2015-12-14 08:56:17 d64 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-12-14 08:56:17 1248 [Note] InnoDB: The InnoDB memory heap is disabled
2015-12-14 08:56:17 1248 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-12-14 08:56:17 1248 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-12-14 08:56:17 1248 [Note] InnoDB: Not using CPU crc32 instructions
2015-12-14 08:56:17 1248 [Note] InnoDB: Initializing buffer pool, size = 38.0M
2015-12-14 08:56:17 1248 [Note] InnoDB: Completed initialization of buffer pool
2015-12-14 08:56:17 1248 [Note] InnoDB: Highest supported file format is Barracuda.
2015-12-14 08:56:17 1248 [Note] InnoDB: The log sequence numbers 33664440039 and 33664440039 in ibdata files do not match the log sequence number 35948349561 in the ib_logfiles!
2015-12-14 08:56:17 1248 [Note] InnoDB: Database was not shutdown normally!
2015-12-14 08:56:17 1248 [Note] InnoDB: Starting crash recovery.
2015-12-14 08:56:17 1248 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-12-14 08:56:24 1248 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_table_stats uses space ID: 1 at filepath: .\mysql\innodb_table_stats.ibd. Cannot open tablespace teamcity/action_history which uses space ID: 1 at filepath: .\teamcity\action_history.ibd
InnoDB: Error: could not open single-table tablespace file .\teamcity\action_history.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
Anyone have a solution to this?
The solution, as the message indicates, is likely to be performing innodb_force_recovery > 0.
To do this, just edit my.cnf, search the file for innodb_force_recovery, it'll look like this:
#innodb_force_recovery = 0
Edit it thusly:
innodb_force_recovery = 2
Then restart the MySQL service. After stopping and restarting it, go back and replace the # in the my.cnf file, then restart the service again. Hopefully, you are able to access your tables. If not, try repeating the process, only set the value to 3 instead. Do not go higher than 3 without further researching innodb_force_recovery.
Best of luck, hope this helps.

mysql database and doublewrite buffer corrupt. How to drop table/database?

Is it possible to drop a table/database manually if it is corrupt? How can I clear the ibdata doublewrite buffer?
I just restored my server. However mysql is not coming up. The error message recomments to set innodb_force_recovery=6. Which allowed to start mysql. So I identified the defect table. However no matter what I try check / repair / drop the corrupt table / database which always ends up in mysql stopping and throwing the error:
ERROR 2013 (HY000): Lost connection to MySQL server during query
Here is the mysql error log from starting mysql:
140702 13:40:36 [Note] Plugin 'FEDERATED' is disabled.
140702 13:40:36 [Warning] option 'innodb-buffer-pool-size': signed value 2097152 adjusted to 5242880
140702 13:40:36 [Warning] option 'innodb-additional-mem-pool-size': signed value 512000 adjusted to 524288
140702 13:40:36 InnoDB: The InnoDB memory heap is disabled
140702 13:40:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140702 13:40:36 InnoDB: Compressed tables use zlib 1.2.3.4
140702 13:40:36 InnoDB: Initializing buffer pool, size = 5.0M
140702 13:40:36 InnoDB: Completed initialization of buffer pool
140702 13:40:36 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
140702 13:40:37 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
140702 13:40:37 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140702 13:40:37 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Warning: database page corruption or a failed
InnoDB: file read of space 0 page 79918.
InnoDB: Trying to recover it from the doublewrite buffer.
InnoDB: Dump of the page:
140702 13:40:37 InnoDB: Page dump in ascii and hex (16384 bytes):
Hexdata
InnoDB: End of page dump
140702 13:40:37 InnoDB: Page checksum 3463763561, prior-to-4.0.14-form checksum 3074131693
InnoDB: stored checksum 2986557383, prior-to-4.0.14-form stored checksum 3074131693
InnoDB: Page lsn 3 3511673317, low 4 bytes of lsn at page end 3511673317
InnoDB: Page number (if stored to page already) 79918,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an index page where index id is 5918
InnoDB: Dump of corresponding page in doublewrite buffer:
140702 13:40:37 InnoDB: Page dump in ascii and hex (16384 bytes):
Hexdata
...
InnoDB: End of page dump
140702 13:40:37 InnoDB: Page checksum 1693035738, prior-to-4.0.14-form checksum 533526999
InnoDB: stored checksum 1060638083, prior-to-4.0.14-form stored checksum 533526999
InnoDB: Page lsn 3 3511586897, low 4 bytes of lsn at page end 3511586897
InnoDB: Page number (if stored to page already) 79918,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an index page where index id is 5918
InnoDB: Also the page in the doublewrite buffer is corrupt.
InnoDB: Cannot continue operation.
InnoDB: You can try to recover the database with the my.cnf
InnoDB: option:
InnoDB: innodb_force_recovery=6
140702 13:40:37 InnoDB: Assertion failure in thread 3064526592 in file trx0sys.c line 604
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.
11:40:37 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 = 346063 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)[0xb72a35c3]
/usr/sbin/mysqld(handle_fatal_signal+0x484)[0xb7150004]
[0xb6e0c500]
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.
Is there any way to drop a database / table while mysql is offline?
Is it possible to clear the ibdata doublewrite buffer since this is blogging mysql from starting normally?

Cannot Start MySql

Our server has been running mysql just fine for over a year. I ran a set of sql script to build a rather large database and in the middle of those scripts, I started getting errors that I had lost connection. Nobody did anything else happened as far as we know. When I tried to log in to mysql, I got:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
When I try to restart mysql, I get:
# sudo service mysql restart
stop: Unknown instance:
start: Job failed to start
The error.log shows:
130212 9:37:51 [Note] Plugin 'FEDERATED' is disabled.
130212 9:37:51 InnoDB: The InnoDB memory heap is disabled
130212 9:37:51 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130212 9:37:51 InnoDB: Compressed tables use zlib 1.2.7
130212 9:37:51 InnoDB: Using Linux native AIO
130212 9:37:51 InnoDB: Initializing buffer pool, size = 10.0G
130212 9:37:51 InnoDB: Completed initialization of buffer pool
130212 9:37:51 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 2186809272046
130212 9:37:51 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 2186814514688
InnoDB: Doing recovery: scanned up to log sequence number 2186816162838
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: in total 27964 row operations to undo
InnoDB: Trx id counter is 18834200
130212 9:37:51 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 4424818.
InnoDB: You may have to recover from a backup.
130212 9:37:51 InnoDB: Page dump in ascii and hex (16384 bytes):
len 16384; hex 058425e20043847200356a3f003e3720000001fd2807769645bf00000000000000000000000000ef31a083ca0000000031980005000003c8000$
InnoDB: End of page dump
18 130212 9:37:51 InnoDB: Page checksum 1501194131, prior-to-4.0.14-form checksum 441953139
InnoDB: stored checksum 92546530, prior-to-4.0.14-form stored checksum 1240647222
InnoDB: Page lsn 509 671577750, low 4 bytes of lsn at page end 441447404
InnoDB: Page number (if stored to page already) 4424818,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an index page where index id is 1096815
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 4424818.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
130212 9:37:51 InnoDB: Assertion failure in thread 140114781574912 in file buf0buf.c line 3603
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.
16:37:51 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 = 346681 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+0x29)[0x7f72aa2435b9]
/usr/sbin/mysqld(handle_fatal_signal+0x3d8)[0x7f72aa12c548]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7f72a8c8dcb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35)[0x7f72a82f6425]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b)[0x7f72a82f9b8b]
/usr/sbin/mysqld(+0x605429)[0x7f72aa32d429]
/usr/sbin/mysqld(+0x631b69)[0x7f72aa359b69]
/usr/sbin/mysqld(+0x5c20a8)[0x7f72aa2ea0a8]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7f72a8c85e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f72a83b3cbd]
I cannot find anything running for mysql including any sockets.
I am taking over for a previous SysAdmin and am fairly new to linux and MySql. We've got to get this system back online soon. Please help.
Have you tried adding the following line to your /etc/mysql/my.cnf and then restarting the server?
[mysqld]
innodb_force_recovery = 4
To add to #elico3000 you will now need to dump your corrupt table(s) and Data to repair the innodb fs. There are a number of ways to do this. You can read through the logs to determine the point of failure and possible tablenames, then dump and recreate those specific tables. Or you can dump the entire MySQL DB and all schemas using a single command, but that will take some time depending on how big your DB. Either way once you have addressed the corrupt table(s) you can set the innodb_force option to 0 and restart mysqld_safe.
Here is a good tutorial on recovery options for both MyISAM and InnoDB MySQL instances and covers a few options. It is far easier to point you here, than regurgitate the commands and concepts again in this answer.
Good luck and come back to ask more pointed questions once you have tried one of the options. There are probably more tutorials out there, but I have used this in Development to rebuild my Dev DB and it has plenty of information.
Look here

Starting MySQL. ERROR! Manager of pid-file quit without updating file

I have a Centos and discovered my MySQL wouldn't start after it suddenly failed. I have tried all possible research in google to no avail. Here is the log details
root#27583 [~]# tail -200 /var/log/mysql.log
18:53: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=134217728
read_buffer_size=2097152
max_used_connections=0
max_threads=500
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 = 2184911 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+0x35)[0x7dad25]
/usr/sbin/mysqld(handle_fatal_signal+0x3e1)[0x693c61]
/lib64/libpthread.so.0[0x7ffa00611ca0]
/lib64/libc.so.6(gsignal+0x35)[0x7ff9ff8112c5]
/lib64/libc.so.6(abort+0x110)[0x7ff9ff812d70]
/usr/sbin/mysqld[0x8deb95]
/usr/sbin/mysqld[0x8b66c9]
/usr/sbin/mysqld[0x8b6c07]
/usr/sbin/mysqld[0x8a87e7]
/usr/sbin/mysqld[0x87eae2]
/usr/sbin/mysqld[0x874ef9]
/usr/sbin/mysqld[0x875514]
/usr/sbin/mysqld[0x876ab1]
/usr/sbin/mysqld[0x8643ba]
/usr/sbin/mysqld[0x82d2a9]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x46)[0x695c66]
/usr/sbin/mysqld[0x587e7c]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0xcf6)[0x58aac6]
/usr/sbin/mysqld[0x5051e3]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x8ad)[0x50829d]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x7ff9ff7fe9c4]
/usr/sbin/mysqld[0x4ff119]
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.
130209 19:53:49 mysqld_safe mysqld from pid file /var/lib/mysql/deepserver.netaviva.net.pid ended
130209 19:58:50 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130209 19:58:50 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
130209 19:58:50 [Note] Plugin 'FEDERATED' is disabled.
130209 19:58:50 InnoDB: The InnoDB memory heap is disabled
130209 19:58:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130209 19:58:50 InnoDB: Compressed tables use zlib 1.2.3
130209 19:58:50 InnoDB: Using Linux native AIO
130209 19:58:50 InnoDB: Initializing buffer pool, size = 128.0M
130209 19:58:50 InnoDB: Completed initialization of buffer pool
130209 19:58:50 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130209 19:58:50 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
130209 19:58:50 InnoDB: Error: page 7 log sequence number 7922893671086
InnoDB: is in the future! Current system log sequence number 6086292560908.
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: 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.
InnoDB: Error: trying to access page number 939544476 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
130209 19:58:50 InnoDB: Assertion failure in thread 139796076951264 in file fil0fil.c line 4436
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.
Please i would greatly appreciate any help to get this working again.