SQLinfo.ru - Все о MySQL

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

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

Вы не зашли.

#1 07.10.2016 15:20:07

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Починить ibdata1

День добрый всем. В общем случилась неприятность - сломали базу мускула.
С подобным сталкиваюсь 1й раз, не пинайте сапогами.
Бэкапов нет. Дампов нет. Есть только ibdata1 и набор файлов со структурой таблиц.
Порыл в инете инфу про то, как восстановить из ibdata и логов. Не помогает.
Мускул упорно отказывается стартовать. innodb_force_recovery не помогает sad
Так понимаю, что рухнул сам ibdata...
При попытке старта через /usr/sbin/mysqld --innodb_force_recovery=4 пишет что процесс запущен, но mysql status возвращает error (111)
Бытует мнение что не хватает места, но... как не хватает??? 10Гб!
Посоветуйте как быть. Спасибо.

Неактивен

 

#2 09.10.2016 02:20:01

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

Re: Починить ibdata1

Здравствуйте, а напишите, пожалуйста, что значит «сломали»? Если у вас есть файлы со структурой и ibdata1 (и есть предположение, что Вы не настраивали особо MySQL), то, кажется, это все файлы, которые нужны?
Почему отказывается стартовать, что пишет?

Неактивен

 

#3 09.10.2016 20:45:07

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

Здравствуйте.
1. Ну, использую виртульный хостинг. Попросил оказать услугу (услуга связана с настройкой сервера). Настроили... sad Потом дико извинялись, но делу это не помогло. Приходится самому думать. После проведения "услуги" попробовал войти на форум и не вышло. Первым делом полез в phpmyadmin и там не подошел пароль админа. Задал им вопрос в чем дело. По идее они стартанули его с force_recovery и чуда не вышло. Как и с какими параметрами, я не знаю. Дальнейшее - это уже мое углубление в материал и попытка спасти базу. Как бы файлы есть, но ibdata скорее всего поврежден.
2. Насчет файлов согласен. Единственное, в чем не уверен, это бинарные логи. Важны они, не важны? Если их удалить, то при запуске сервиса они создаются заново с тем же размером. Потому, думаю, они не критичны.
3. В логах пишется по крайней мере о 3х поврежденных блоках. Выдается их хекс и всякая брань на буржуйском языке о несоответствии контрольных чисел.
4. Ну и я не знаю как должен вести себя мускул после запуска с восстановлением. Т.е. по идее он запускается в безопасном режиме где не работают половина функций. Но я даже статуса не вижу, т.к. пишет ошибку (111). При попытке сделать дамп также ругается на 111. Поставил себе мускул под винду, подбрасывал туда файлы, но процесс не запускается так же.

Начинаю пить валерьянку и в черновиках писать заявление на отпуск...

Отредактированно BSBAlex (09.10.2016 20:46:35)

Неактивен

 

#4 09.10.2016 21:00:09

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

Re: Починить ibdata1

Напишите, пожалуйста, текст из журнала ошибок при штатном запуске и при force_recovery сюда.

Неактивен

 

#5 10.10.2016 10:31:43

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

Обычный запуск: http://prntscr.com/cryot2
При запуске с --innodb_force_recovery=4 лог почему-то такой же sad Может я что не так делаю.
Пробовал и в my.cnf прописывать команду и в командной строке - результат тот же. Либо лог может в другом месте хранится а я не то смотрю? лог смотрю в var/log/mysql/error.log

Неактивен

 

#6 10.10.2016 14:51:22

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

Re: Починить ibdata1

Прямо дословно такой же? Там как минимум должна появиться строчка про включенный force_recovery. Текстовые файлы удобно изучать, когда они есть локально. Ну то есть скриншот из середины не очень показателен smile Добудете оба лога, чтобы их можно было посмотреть и сравнить?

Еще — я правильно понимаю, что вы удалили ib_logfile, и старых копий нету?

Неактивен

 

#7 10.10.2016 15:33:47

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

Старые копии есть. Ну по крайней мере те, что стали доступны после вмешательства умельцев из службы поддержки. Насколько они правильные я не скажу... Еще нашел похожую беду в статье http://sqlinfo.ru/forum/viewtopic.php?id=7771 но там ссылки не работают. Логи постараюсь воссоздать в текстовом виде.

Неактивен

 

#8 10.10.2016 16:12:13

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

Обычный запуск:
161010 16:00:34 [Note] Plugin 'FEDERATED' is disabled.
161010 16:00:34 InnoDB: The InnoDB memory heap is disabled
161010 16:00:34 InnoDB: Mutexes and rw_locks use GCC atomic builtins
161010 16:00:34 InnoDB: Compressed tables use zlib 1.2.3.4
161010 16:00:34 InnoDB: Initializing buffer pool, size = 128.0M
161010 16:00:34 InnoDB: Completed initialization of buffer pool
161010 16:00:34 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!
161010 16:00:34  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...
161010 16:00:34  InnoDB: ERROR: We were only able to scan the log up to
InnoDB: 534615552, but a checkpoint was at 534615564.
InnoDB: It is possible that the database is now corrupt!
161010 16:00:34  InnoDB: Error: page 7 log sequence number 988569027
InnoDB: is in the future! Current system log sequence number 534615564.
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/ … overy.html
InnoDB: for more information.
161010 16:00:34  InnoDB: Error: page 1 log sequence number 989469666
InnoDB: is in the future! Current system log sequence number 534615564.
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/ … overy.html
InnoDB: for more information.
161010 16:00:34  InnoDB: Error: page 4 log sequence number 567137200
InnoDB: is in the future! Current system log sequence number 534615564.
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/ … overy.html
InnoDB: for more information.
161010 16:00:34  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 26:39649279, should be 0:604!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 604.
InnoDB: You may have to recover from a backup.
161010 16:00:34  InnoDB: Page dump in ascii and hex (16384 bytes):

Запуск с force:
161010 16:07:58 [Note] Plugin 'FEDERATED' is disabled.
161010 16:07:58 InnoDB: The InnoDB memory heap is disabled
161010 16:07:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
161010 16:07:58 InnoDB: Compressed tables use zlib 1.2.3.4
161010 16:07:58 InnoDB: Initializing buffer pool, size = 128.0M
161010 16:07:58 InnoDB: Completed initialization of buffer pool
161010 16:07:58 InnoDB: highest supported file format is Barracuda.
InnoDB: The user has set SRV_FORCE_NO_LOG_REDO on
InnoDB: Skipping log redo
161010 16:07:58  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 26:39649279, should be 0:604!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 604.
InnoDB: You may have to recover from a backup.
161010 16:07:58  InnoDB: Page dump in ascii and hex (16384 bytes):
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 604.
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/ … overy.html
InnoDB: about forcing recovery.

Неактивен

 

#9 10.10.2016 18:14:15

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

Re: Починить ibdata1

Ну то есть с force-recovery завелось?

Неактивен

 

#10 11.10.2016 08:30:25

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

А как узнать что завелось? Пишет что процесс стартовал с ид таким-то, но mysql status дает ошибку 111. дамп дает ошибку 111. Т.е. признаков жизни мускула я как бы не вижу. Повторюсь, это 1й раз такое и что по чем я не в курсе sad
Сокет есть, пути к нему прописаны, права выданы...

Отредактированно BSBAlex (11.10.2016 12:05:21)

Неактивен

 

#11 11.10.2016 14:41:13

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

Странная вещь произошла! Задумал переустановить мускул. Удалил все.
Стер 3 файла: ib_logfile0, ib_logfile1, ibdata1.
Сделал purge mysql, потом install...
Мускул запустился! И что неожиданно - с некоторыми базами и парами таблиц в каждой с данными. MySql база так вообще целая походу... Как это понимать?

Ладно, имеющимися средствами восстановить возможно и не выйдет. Может вы мне подскажете где можно найти структуру самого ibdata файла? Как там чего хранится? Если что, я сам повыдираю нужные блоки...

Отредактированно BSBAlex (11.10.2016 15:09:58)

Неактивен

 

#12 12.10.2016 01:03:27

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

Re: Починить ibdata1

Если у Вас остались таблицы с данными, значит, они не InnoDB. Скорее всего, MyISAM. Про структуру — смотрите FAQ#15, но это не то, чтобы легко сделать. Я бы попробовал для начала таки понять, почему не запускается (при условии, что у Вас были таблицы InnoDB). Для этого нужно прочитать лог и, раз Вы не хотите его публиковать тут целиком, то самостоятельно.

Неактивен

 

#13 12.10.2016 08:37:59

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

Те таблицы, что остались, действительно myisam. Им повезло )
По поводу лога... большой он! Ну ладно...
161010 16:07:58 [Note] Plugin 'FEDERATED' is disabled.
161010 16:07:58 InnoDB: The InnoDB memory heap is disabled
161010 16:07:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
161010 16:07:58 InnoDB: Compressed tables use zlib 1.2.3.4
161010 16:07:58 InnoDB: Initializing buffer pool, size = 128.0M
161010 16:07:58 InnoDB: Completed initialization of buffer pool
161010 16:07:58 InnoDB: highest supported file format is Barracuda.
InnoDB: The user has set SRV_FORCE_NO_LOG_REDO on
InnoDB: Skipping log redo
161010 16:07:58  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 26:39649279, should be 0:604!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 604.
InnoDB: You may have to recover from a backup.
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 604.
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/ … overy.html
InnoDB: about forcing recovery.
InnoDB: Page directory corruption: infimum not pointed to
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: Page directory corruption: supremum not pointed to
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: wrong number of columns in SYS_INDEXES record
InnoDB: Page directory corruption: infimum not pointed to
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: Page directory corruption: supremum not pointed to
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: wrong number of columns in SYS_INDEXES record
InnoDB: Page directory corruption: infimum not pointed to
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: Page directory corruption: supremum not pointed to
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: wrong number of columns in SYS_INDEXES record
InnoDB: Page directory corruption: infimum not pointed to
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: Page directory corruption: supremum not pointed to
...
161010 16:07:59  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
InnoDB: wrong number of columns in SYS_INDEXES record
161010 16:07:59  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:232980480, should be 0:3555!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3555.
InnoDB: You may have to recover from a backup.
...
161010 16:07:59  InnoDB: Page checksum 1662579768, prior-to-4.0.14-form checksum 3025939485
InnoDB: stored checksum 1119682560, prior-to-4.0.14-form stored checksum 2541435643
InnoDB: Page lsn 15099 1919614978, low 4 bytes of lsn at page end 1919661799
InnoDB: Page number (if stored to page already) 232980480,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 2
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3555.
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/ … overy.html
InnoDB: about forcing recovery.
161010 16:07:59  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:193593344, should be 0:2954!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 2954.
InnoDB: You may have to recover from a backup.
...
161010 16:07:59  InnoDB: Page checksum 2275578983, prior-to-4.0.14-form checksum 1874468282
InnoDB: stored checksum 2671181824, prior-to-4.0.14-form stored checksum 2434939643
InnoDB: Page lsn 15099 1922170882, low 4 bytes of lsn at page end 1922174220
InnoDB: Page number (if stored to page already) 193593344,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 2
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 2954.
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/ … overy.html
InnoDB: about forcing recovery.
161010 16:07:59  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:45940736, should be 0:701!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 701.
InnoDB: You may have to recover from a backup.
...
161010 16:07:59  InnoDB: Page checksum 3191491439, prior-to-4.0.14-form checksum 2081512642
InnoDB: stored checksum 1245118464, prior-to-4.0.14-form stored checksum 3678026491
InnoDB: Page lsn 15099 1924726786, low 4 bytes of lsn at page end 1924743489
InnoDB: Page number (if stored to page already) 45940736,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 2
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 701.
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/ … overy.html
InnoDB: about forcing recovery.
161010 16:07:59  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:233504768, should be 0:3563!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3563.
InnoDB: You may have to recover from a backup.
...
161010 16:07:59  InnoDB: Page checksum 1503049865, prior-to-4.0.14-form checksum 1345693658
InnoDB: stored checksum 689176576, prior-to-4.0.14-form stored checksum 2452110075
InnoDB: Page lsn 15099 1927282690, low 4 bytes of lsn at page end 1927310167
InnoDB: Page number (if stored to page already) 233504768,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 2
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3563.
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/ … overy.html
InnoDB: about forcing recovery.
161010 16:07:59  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:231276544, should be 0:3529!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3529.
InnoDB: You may have to recover from a backup.
...
161010 16:07:59  InnoDB: Page checksum 205382592, prior-to-4.0.14-form checksum 2048549120
InnoDB: stored checksum 4067360768, prior-to-4.0.14-form stored checksum 1242774267
InnoDB: Page lsn 15099 1929838594, low 4 bytes of lsn at page end 1929874136
InnoDB: Page number (if stored to page already) 231276544,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 2
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3529.
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/ … overy.html
InnoDB: about forcing recovery.
161010 16:07:59  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:233570304, should be 0:3564!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3564.
InnoDB: You may have to recover from a backup.
...
161010 16:07:59  InnoDB: Page checksum 79838741, prior-to-4.0.14-form checksum 2133578430
InnoDB: stored checksum 882180096, prior-to-4.0.14-form stored checksum 2924100347
InnoDB: Page lsn 15099 1932394498, low 4 bytes of lsn at page end 1932459170
InnoDB: Page number (if stored to page already) 233570304,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 2
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3564.
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/ … overy.html
InnoDB: about forcing recovery.
161010 16:07:59  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:195559424, should be 0:2984!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 2984.
InnoDB: You may have to recover from a backup.
...
161010 16:07:59  InnoDB: Page checksum 2635952110, prior-to-4.0.14-form checksum 1452663011
InnoDB: stored checksum 938999808, prior-to-4.0.14-form stored checksum 1091844859
InnoDB: Page lsn 15099 1934950402, low 4 bytes of lsn at page end 1934982782
InnoDB: Page number (if stored to page already) 195559424,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 2
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 2984.
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/ … overy.html
InnoDB: about forcing recovery.
161010 16:07:59  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:233242624, should be 0:3559!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3559.
InnoDB: You may have to recover from a backup.
...
161010 16:08:00  InnoDB: Page checksum 3765235455, prior-to-4.0.14-form checksum 1489697094
InnoDB: stored checksum 1306329088, prior-to-4.0.14-form stored checksum 474364667
InnoDB: Page lsn 15099 1937506306, low 4 bytes of lsn at page end 1937521694
InnoDB: Page number (if stored to page already) 233242624,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 2
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3559.
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/ … overy.html
InnoDB: about forcing recovery.
161010 16:08:00  InnoDB: Error: space id and page nyikes stored in the page
InnoDB: read in are 2:28049408, should be 0:428!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 428.
InnoDB: You may have to recover from a backup.
...
161010 16:08:03  InnoDB: Page checksum 2689706496, prior-to-4.0.14-form checksum 3250609499
InnoDB: stored checksum 3964862464, prior-to-4.0.14-form stored checksum 1925188315
InnoDB: Page lsn 2779 524502463, low 4 bytes of lsn at page end 524550129
InnoDB: Page number (if stored to page already) 39649279,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 26
InnoDB: Page may be a freshly allocated page
161010 16:08:03  InnoDB: Assertion failure in thread 139646221883200 in file page0page.ic line 745
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/ … overy.html
InnoDB: about forcing recovery.
13:08:03 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=4194304
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 = 334412 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)[0x7f01ebca6329]
/usr/sbin/mysqld(handle_fatal_signal+0x483)[0x7f01ebb6b013]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7f01ea8b3cb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35)[0x7f01e9f1f0d5]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b)[0x7f01e9f2283b]
/usr/sbin/mysqld(+0x599cc9)[0x7f01ebce4cc9]
/usr/sbin/mysqld(+0x6629d9)[0x7f01ebdad9d9]
/usr/sbin/mysqld(+0x5ba911)[0x7f01ebd05911]
/usr/sbin/mysqld(+0x584599)[0x7f01ebccf599]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x7f01ebb6d6e1]
/usr/sbin/mysqld(+0x30e6d1)[0x7f01eba596d1]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0xad4)[0x7f01eba5cdf4]
/usr/sbin/mysqld(+0x285206)[0x7f01eb9d0206]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x624)[0x7f01eb9d3c74]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f01e9f0a76d]
/usr/sbin/mysqld(+0x27ea85)[0x7f01eb9c9a85]
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.

Неактивен

 

#14 12.10.2016 22:36:33

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

Re: Починить ibdata1

Кажется, всё печально, да sad

Еще вопрос — не может оказаться, что после старта приходит какой-нибудь mysqlcheck автоматический? Без него, возможно, удастся восстановить данные хоть из каки-то табличек.

Ну и там, где не удается, — к сожалению, только по FAQ#15 sad

Неактивен

 

#15 13.10.2016 08:18:17

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

paulus написал:

Еще вопрос — не может оказаться, что после старта приходит какой-нибудь mysqlcheck автоматический?

А как это узнать? И где на это установки?
По поводу фак15 не нашел что искал. Может не туда смотрел smile данные то я вижу, но меня смущает их порядок. Указателей на текстовые строки нет, длин строк нет. Целочисленные данные хранятся как-то не так... Загадка smile

Неактивен

 

#16 13.10.2016 12:10:07

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

Re: Починить ibdata1

Узнать — универсального способа нет. Этим грешит debian в стандартной установке. Чтобы точно избежать, можно попробовать запустить демона непосредственно из консоли. Что-нибудь типа mysqld --defaults-file=/etc/mysql/my.cnf.

Про восстановление — это прямо тяжелая и неблагодарная работа, да. Странички раскиданы по всему tablespace в каком-то порядке, со ссылками между ними. Насколько я знаю, гарантию восстановления тут никто не дает. Алгоритм восстановления написан, например, вот тут — http://sqlinfo.ru/forum/viewtopic.php?pid=25107#p25107.

Неактивен

 

#17 14.10.2016 11:31:20

BSBAlex
Участник
Зарегистрирован: 07.10.2016
Сообщений: 16

Re: Починить ibdata1

Это я читал и пробовал. Не прокатило. Я просто хотел структуру файла узнать. Заголовок, тело, указатели начала страниц, деревьев и т.п.
В целом я данные поднял напрямую из базы путем нехитрого анализа расположения данных. Но вытаскивать удается только по страничке.
Да и типа данных типа int все же как-то маскируются smile Так и не понял в чем фокус. Например, на 1м листе поле id совпадает. На 2м оно
инкрементится, но идет на порядок ниже. Т.е. должно быть 300, 310, 320, к примеру. А идет 10, 20, 30... загадка smile
А может это и не поле id а некий порядковый номер записей...
Строки вообще идут по порядку без разделителей, но в таком случае где-то должна указываться длина записей...
В любом случае спасибо за содействие, что было критично я вытащил, остальное накопим заново smile
Ну и надо делать бэкапы big_smile нет ничего вечного.
Кстати... у вас есть статейка с описанием как настроить мускул или крон на создание бэкапов. И как их лучше всего делать?

Неактивен

 

#18 14.10.2016 12:08:52

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

Re: Починить ibdata1

Зависит от конкретной задачи. В простейшем случае можно просто mysqldump сделать, когда данных много, обычно используют xtrabackup (он же умеет инкрементальные бэкапы). Некоторые отважные умы ставят на файловые системы со снэпшотами типа btrfs и делают бэкапы снэпшотами. В теории это должно работать, но на практике никогда не проверял.

Неактивен

 

#19 14.10.2016 12:09:31

rgbeast
Администратор
MySQL Authorized Developer and DBA
Откуда: Москва
Зарегистрирован: 21.01.2007
Сообщений: 3878

Re: Починить ibdata1

Формат файла ibdata можно узнать из исходников Innodb. К сожалению, простое изложение мне неизвестно. Если найдете, напишите.

Бэкап можно делать разными способами. Главное, чтобы он был. Могу рекомендовать автоматически развертывать бэкап на тестовом сайте, тогда будет просто проверить, что он работает
http://webew.ru/articles/1462.webew

Неактивен

 

Board footer

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