Question

I backup mysql database, and then try to restore it in a later version using xtrabackup, mysql service can't start up.

old mysql version:5.0.90;

new version:5.5.31

Recovery Steps:

  1. innobackupex --use-memory=4G --apply-log /data/backups/2010-03-13_02-42-44/

  2. innobackupex --copy-back /data/backups/2010-03-13_02-42-44/

    The second step shows that xtrabackup restored mysql database completely.

  3. sudo mysql service start mysql

I try to start mysql service, it shows "Job failed to start".i check the permission of these database files,as you can see below.

-rw-r--r-- 1 mysql mysql  209715200  7月 11 06:02 ibdata1
-rw-r--r-- 1 mysql mysql 1048576000  7月 11 06:03 ib_logfile0
-rw-r--r-- 1 mysql mysql 1048576000  7月 11 06:03 ib_logfile1
drwxr-xr-x 2 mysql mysql       4096  7月 11 06:02 mysql
drwxr-xr-x 2 mysql mysql      12288  7月 11 06:02 sp5084afbe48ce9
drwxr-xr-x 2 mysql mysql       4096  7月 11 06:02 test
-rw-r--r-- 1 mysql mysql         52  7月 11 06:02 xtrabackup_binlog_pos_innodb
-rw-r--r-- 1 mysql mysql         76  7月 11 06:02 xtrabackup_slave_info

This is the error:

InnoDB: Error: log file ./ib_logfile0 is of different size 0 1048576000 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
130711  6:08:56 [ERROR] Plugin 'InnoDB' init function returned error.
130711  6:08:56 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130711  6:08:56 [ERROR] Unknown/unsupported storage engine: InnoDB
130711  6:08:56 [ERROR] Aborting

130711  6:08:56 [Note] /usr/sbin/mysqld: Shutdown complete
Was it helpful?

Solution

Check the /etc/mysql/my.cnf and look for the

innodb_log_file_size = 5M

and change that to

innodb_log_file_size = 1000M

Cause 1048576000/1024/1024=1000 and that is how much is InnoDB engine is expecting for log file size.

similar problem

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top