35

I have recently updated mysql that was located under my xampp folder, and i've got the following errors, reporting from the log file :

2018-04-19T12:59:19.667059Z 0 [System] [MY-010116] [Server] C:\xampp\mysql\bin\mysqld.exe (mysqld 8.0.11) starting as process 9324
2018-04-19T12:59:20.025280Z 1 [ERROR] [MY-013090] [InnoDB] InnoDB: Unsupported redo log format (0). The redo log was created before MySQL 5.7.9
2018-04-19T12:59:20.026140Z 1 [ERROR] [MY-012930] [InnoDB] InnoDB: Plugin initialization aborted with error Generic error.
2018-04-19T12:59:20.229069Z 1 [ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine.
2018-04-19T12:59:20.230803Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2018-04-19T12:59:20.231371Z 0 [ERROR] [MY-010119] [Server] Aborting
2018-04-19T12:59:20.233136Z 0 [System] [MY-010910] [Server] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete (mysqld 8.0.11)  MySQL Community Server - GPL.

I have been told if updating your mysql, you should comment out the deprecated configs that are located in your my.ini, but i had no idea what to comment out, so i left it as it is.

Any idea what causes this?

Ahmed Dolabi
  • 425
  • 1
  • 5
  • 10
  • https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en/downgrading-to-previous-series.html : To simplify InnoDB tablespace discovery during crash recovery, new redo log record types were introduced in MySQL 5.7.5. This enhancement changes the redo log format. Before performing an in-place downgrade from MySQL 5.7.5 or later, perform a clean shutdown using an innodb_fast_shutdown setting of 0 or 1. A slow shutdown using innodb_fast_shutdown=0 is a recommended step in In-Place Downgrade. – aynber Apr 19 '18 at 13:18
  • Question one why are you using a MySQL version which isn't stabile and not ready jet for production.. – Raymond Nijland Apr 19 '18 at 13:22
  • 2
    Next question to Raymond: why should MySQL 8.0.11 not be stable? It was released today as a GA version – Nico Haase Apr 19 '18 at 13:41
  • 1
    Well the main reason for using a newer version, generally, for getting better performance, getting the latest stuff etc.. But my main reason for upgrading is the usage of this command : json_objectagg so i could group rows into one json object for later usage. I couldn't find a better solution than using this function to be honest. If you have any other substitutes, they are always welcomed. – Ahmed Dolabi Apr 19 '18 at 13:41
  • I have the same issue, anyone have any ideas on how to resolve this? – xpagesbeast Apr 29 '18 at 04:55

4 Answers4

54

If you have already installed MySQL and did not perform a slow shutdown using the

innodb_fast_shutdown

Flag, simply go to your MySQL directory

/var/lib/mysql/

And remove the log files (Do not do this if you need the table data in your database until you have backed up your database):

ib_logfile0 ib_logfile1

Back them up before if you need them again.

nox7
  • 698
  • 6
  • 8
  • 3
    The problem also arose when trying to *down*grade a MariaDB database from 10.5 to 10.4. The solution of deleting `ib_logfile0` worked - and then running `mysql_upgrade` restored access to all data (I tested the downgrade on only toy data I hasten to add). – mirekphd Aug 24 '20 at 15:03
  • What those files are ```ib_logfile0 and ib_logfile1```? – java dev Sep 28 '21 at 12:30
  • I found these files in /usr/local/var/mysql – dyang Sep 28 '21 at 22:36
7

Docker users

I faced with the same error while using dockerized mariaDB.

The solution was:

remove the docker image:

docker image ls
docker rmi imagename

remove the volume:

docker volume ls
docker volume rm yourvolume

remove the container:

docker ps -a
docker rm yourcontainer

Then:

docker-compose up

Windows 10 Users

Also in windows if you want to remove the log files as it was suggested earlier: The ib_logfiles are in

C:\ProgramData\MySQL\MySQL Server x.x\Data

Soleco
  • 71
  • 1
  • 3
  • 1
    for what is worth, the useful parts are removing the colume and the container. The image, as long as it is not used to run a container, is not doing anything. – Pier A Feb 16 '23 at 10:45
2

Mac OS X Users

The ib_logfiles are here

rm /usr/local/var/mysql/ib_logfile*
Tenzin Chemi
  • 5,101
  • 2
  • 27
  • 33
1

In my case, I have deleted the complete folder /var/lib/mysql and restarted the mysql service and it worked...

rm -rf  /var/lib/mysql

Note: You may loose your data if you delete that folder

  • 'You may loose your data if you delete that folder' . You _will_ lose your data if you delete that folder (if the db is installed under `/var/lib/mysql` ) – Pier A Feb 16 '23 at 10:45