'Docker - Unsupported redo log format. The redo log was created with MariaDB x.x.x

While trying to spin up a server using docker-compose I have an issue when I try to downgrade or upgrade the mysql image. As I am just trying to identify the right mysql/maraidb version I'm not concerned about the data at the moment.

I've been getting the following error

"Unsupported redo log format. The redo log was created with MariaDB 10.6.5."

I am unable to delete the logs ib_logfile0 ib_logfile1. How do I successfully upgrade/downgrade mysql when it is giving such an error?



Solution 1:[1]

When the upgraded/downgraded version of the mysql/mariadb is spun up, you can't delete the ib_logfile0 ib_logfile1 log files because the new version won't start and therefore you can't even docker exec into it.

Since data retention is not a priority, the solution here is to remove the specific container or any stopped containers and all unused images (not just dangling images), add the -a flag to the command.

docker system prune -a

Also this issue may happen if you are moving between two different project folders. in that case, try to identify the volumes that may have used the same image and delete them where necessary

docker volume rm volume_name volume_name

More on how to remove stopped images: https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1