0

I was upgrading Ubunto from 18 to 20, and lost SSH during mysql upgrade.

Mysql won't start now. It has the error:

ib_logfile0 size 44895232 is not a multiple of innodb_page_size after Ubuntu upgrade 

InnoDB: Error: log file ./ib_logfile0 is of different size I tried the suggestion here to no avail.

2022-07-25T17:25:13.890483Z 1 [ERROR] [MY-012962] [InnoDB] Log file ./ib_logfile0 size 44895232 is not a multiple of innodb_page_size 2022-07-25T17:25:13.890544Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2022-07-25T17:25:14.375381Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2022-07-25T17:25:14.375568Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2022-07-25T17:25:14.375652Z 0 [ERROR] [MY-010119] [Server] Aborting 

Almost all posts I found have the same suggestion, so I am lost.

  1. deleted the 2 log files

  2. set my innodb settings as found in another post (see below)

     innodb_fast_shutdown =0 innodb_buffer_pool_size = 2560M innodb_log_file_size = 256M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 2 innodb_thread_concurrency = 16 innodb_flush_method = O_DIRECT 
5
  • innodb_page_size=8K if I add this line I get a different error: Data file './ibdata1' uses page size 16384, but the innodb_page_size start-up parameter is 8192 Commented Jul 25, 2022 at 19:33
  • Which MySQL version before the upgrade? What version after? Commented Jul 26, 2022 at 5:25
  • It is an odd multiple of 1024 -- which should never happen. Hence 8192 did not work. Commented Jul 26, 2022 at 5:30
  • Questions like this are better served at dba.stackexchange.com . Commented Jul 26, 2022 at 5:33
  • mysql version 5.7 to 8, thanks @rick-james I will repost there Commented Jul 26, 2022 at 7:42

1 Answer 1

3

innodb_page_size is by default 16K which is 16384 and your innodb_log_file_size seems to be corrupted in half way during upgrade. When you say you lost ssh, does that mean server was rebooted? you might need to take a backup of ib_logfile0 and move out of data directory and try starting mysql with innodb_page_size as default. Your data dictionary is already created with 16k page size so it wont accept new value.

Remove innodb_page_size variable from conf and let it be default. Backup ib_logfile0 and move it out of data directory. When you will start mysql it will generate a new one. Post if any more errors.

4
  • I tried the responses. Removing the innodb_page_size brought back the Log file ./ib_logfile0 size 1024 is not a multiple of innodb_page_size error. (i removed the 2 log files from the directory also) Commented Jul 26, 2022 at 8:01
  • 1
    before your error was Log file ./ib_logfile0 size 44895232 is not and now it is ib_logfile0 size 1024 so somewhere in my.cnf you have defined incorrect innodb_log_file_size. you might need to remove and let it be default if you dont want to extend it. What version of mysql you are using? Can you post the whole my.cnf? Commented Jul 27, 2022 at 3:10
  • Yunus, thank you so much for the feedback, I am sure with your help I would have got it. I had a month old backup, I restored it, because following too many tutorials I had no idea what I did and where. Commented Jul 27, 2022 at 6:36
  • Good to know you were able to solve with your old backup Commented Jul 28, 2022 at 7:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.