4

I am trying to restore innodb databases from files. I followed

  1. Stop your mysql daemon/service (# services stop mysql) on mine services.msc and made sure MySql service is not running.
  2. Replace the new “data” directory with the backed-up one (don’t forget to work on a copy of your backup, and not with your one and only backup!!)
  3. Start your mysqld with the innodb revocery parameters, and keep that windows open: mysqld --standalone --console --innodb-force-recovery=4. The console will stay open and you’ll see the log messages directly on your screen (CTRL-C will close the server), I came across number of problem please see after step 7 I have copied & pasted my output from my recovery.

and finally entered sudo -u mysql mysqld --standalone --console --explicit_defaults_for_timestamp --innodb-force-recovery=4 and I got

2016-10-21T04:56:01.469769Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2016-10-21T04:56:01.469808Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2016-10-21T04:56:01.608783Z 0 [Note] mysqld (mysqld 5.7.15-0ubuntu2) starting as process 21945 ...
2016-10-21T04:56:01.611402Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-10-21T04:56:01.611455Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-10-21T04:56:01.611514Z 0 [Note] InnoDB: Uses event mutexes
2016-10-21T04:56:01.611551Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-10-21T04:56:01.611586Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-10-21T04:56:01.611620Z 0 [Note] InnoDB: Using Linux native AIO
2016-10-21T04:56:01.611798Z 0 [Note] InnoDB: Number of pools: 1
2016-10-21T04:56:01.611903Z 0 [Note] InnoDB: Using CPU crc32 instructions
2016-10-21T04:56:01.612745Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-10-21T04:56:01.617639Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-10-21T04:56:01.618798Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-10-21T04:56:01.630251Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-10-21T04:56:01.630414Z 0 [ERROR] InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5.7.9, and it appears corrupted. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading.html
2016-10-21T04:56:01.630461Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2016-10-21T04:56:02.232149Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-10-21T04:56:02.232182Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-10-21T04:56:02.232190Z 0 [ERROR] Failed to initialize plugins.
2016-10-21T04:56:02.232195Z 0 [ERROR] Aborting

2016-10-21T04:56:02.232201Z 0 [Note] Binlog end
2016-10-21T04:56:02.232251Z 0 [Note] Shutting down plugin 'CSV'
2016-10-21T04:56:02.232586Z 0 [Note] mysqld: Shutdown complete

Yet I don't want to upgrade but just restore the files into an sql file. How do I just restore the files into an sql file and that's it?

EDIT: --innodb-force-recovery=6 solved it, how intuitive.

0

You must log in to answer this question.

Browse other questions tagged .