Downgrade to Mysql8.0

Hello! I installed MySQL 8.4 and now I’d like to use MySQL 8.0.

I first followed these steps:

https://dev.mysql.com/doc/refman/5.7/en/downgrade-binary-package.html

I’ve downloaded the repo from the MySQL site and when installing it I get this:

rpm -i mysql80-community-release-sles12-9.noarch.rpm
warning: mysql80-community-release-sles12-9.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID a8d3785c: NOKEY
error: Failed dependencies:
	mysql80-community-release is obsoleted by (installed) mysql84-community-release-sl15-1.noarch

I’ve read the manpages and tried this:

rpm -i --force --oldpackage mysql80-community-release-sles12-9.noarch.rpm
warning: mysql80-community-release-sles12-9.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID a8d3785c: NOKEY
error: Failed dependencies:
	mysql80-community-release is obsoleted by (installed) mysql84-community-release-sl15-1.noarch

Read manpages some more and then tried this and some progress:

rpm -i --nodeps --oldpackage mysql80-community-release-sles12-9.noarch.rpm
warning: mysql80-community-release-sles12-9.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID a8d3785c: NOKEY
	file /etc/RPM-GPG-KEY-mysql from install of mysql80-community-release-sles12-9.noarch conflicts with file from package mysql84-community-release-sl15-1.noarch
	file /etc/RPM-GPG-KEY-mysql-2022 from install of mysql80-community-release-sles12-9.noarch conflicts with file from package mysql84-community-release-sl15-1.noarch
	file /etc/RPM-GPG-KEY-mysql-2023 from install of mysql80-community-release-sles12-9.noarch conflicts with file from package mysql84-community-release-sl15-1.noarch
	file /etc/zypp/repos.d/mysql-community-debuginfo.repo from install of mysql80-community-release-sles12-9.noarch conflicts with file from package mysql84-community-release-sl15-1.noarch
	file /etc/zypp/repos.d/mysql-community-source.repo from install of mysql80-community-release-sles12-9.noarch conflicts with file from package mysql84-community-release-sl15-1.noarch
	file /etc/zypp/repos.d/mysql-community.repo from install of mysql80-community-release-sles12-9.noarch conflicts with file from package mysql84-community-release-sl15-1.noarch

So now I find myself with the following scenario:

Reading installed packages...

S  | Name                           | Type    | Version      | Arch   | Repository
---+--------------------------------+---------+--------------+--------+-------------------------------
i  | mysql-community-client         | package | 8.4.3-1.sl15 | x86_64 | MySQL 8.4 LTS Community Server
i  | mysql-community-client-plugins | package | 8.4.3-1.sl15 | x86_64 | MySQL 8.4 LTS Community Server
i  | mysql-community-common         | package | 8.4.3-1.sl15 | x86_64 | MySQL 8.4 LTS Community Server
i  | mysql-community-icu-data-files | package | 8.4.3-1.sl15 | x86_64 | MySQL 8.4 LTS Community Server
i  | mysql-community-libs           | package | 8.4.3-1.sl15 | x86_64 | MySQL 8.4 LTS Community Server
i+ | mysql-community-server         | package | 8.4.3-1.sl15 | x86_64 | MySQL 8.4 LTS Community Server
i+ | mysql80-community-release      | package | sles12-9     | noarch | (System Packages)
i+ | mysql84-community-release      | package | sl15-1       | noarch | MySQL 8.4 LTS Community Server
zypper in mysql80-community-release
Loading repository data...
Warning: Repository 'Update repository of openSUSE Backports' metadata expired since 2024-12-10 08:06:01 -03.
Warning: Repository 'Main Update Repository' metadata expired since 2024-12-10 06:56:55 -03.

    Warning: Repository metadata expired: Check if 'autorefresh' is turned on (zypper lr), otherwise
    manually refresh the repository (zypper ref). If this does not solve the issue, it could be that
    you are using a broken mirror or the server has actually discontinued to support the repository.

Reading installed packages...
'mysql80-community-release' is already installed.
Package 'mysql80-community-release' is not available in your repositories. Cannot reinstall, upgrade, or downgrade.
Resolving package dependencies...
Nothing to do.

How do I downgrade to 8.0 without uninstalling 8.4? Mostly because the app I’m using requires 8.0 and I don’t want to lose all my DB configuration.

Any help is greatly appreciated!

What I’d probably do is use mysqldump to backup the database, and then restore that configuration to a database installed in a Docker container. Having both running, you’ll have to change the port of one or the other from the default of 3306, and whatever application you’re using will have to be updated to connect to the correct port, but that’s the easiest way to run both versions and not run into dependency issues.

1 Like

Thank you! Will try that.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.