1

I preinstalled Oracle Enteprise Linux and it automatically installed Mysql Community 5.1. But I wanna update it to 8. After update the daemon won't start and the /var/log/mysqld.log shows that

[ERROR] [MY-012263] [InnoDB] The Auto-extending innodb_system data file './ibdata1' is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!

Then I change the /etc/my.cnf file and add

innodb_data_file_path = ibdata1:10M:autoextend

I tried to start it again and the log file said

[ERROR] [InnoDB] Unsupported redo log format (0). The redo log was created before MySQL 5.7.9

because if that, I moved the /var/lib/mysql/ib_logfile* to backup directory and try to start mysqld again. BUT it still won't start because the log file said

[ERROR] [MY-012960] [InnoDB] Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
[ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
[ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine.
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
[ERROR] [MY-010119] [Server] Aborting

Any help would be appreciated.

3 Answers 3

1

That is a gynormous upgrade.

Plan A: Oracle recommends doing it in 4 steps 5.1 -> 5.5 -> 5.6 -> 5.7 -> 8.0. And, at each step, run mysql_upgrade.

Plan B: Alternatively, you could dump the data and hope that the reload doesn't find some syntax errors.

I fear that you may have already hosed the files too much to have a successful upgrade.

2
  • what about reinstalling the whole thing? Aug 23, 2019 at 7:03
  • 1
    @ChristophorusReyhan - If you have no data to save, that would probably be best and easiest.
    – Rick James
    Aug 23, 2019 at 17:20
0

For the solution, I reinstall it completely with

yum remove -y mysql mysql-server
rm -rf /var/lib/mysql/ #to make sure it completely deleted
yum install mysql mysql-server
service mysqld start

It works like a charm. Not recommending this solution if the database have useful data inside.

-1
  1. deleet the old mysql files
  2. delete the old mysql container/pod
  3. deploy the new mysql v 8
  4. solved the issue for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.