简体   繁体   English

将 mysql 8.0.27 降级到 8.0.26 ubuntu 20.04

[英]Downgrade mysql 8.0.27 to 8.0.26 ubuntu 20.04

I set up a new AWS EC2 instance with Ubuntu 20.04, php, Apache, and mySQL.我使用 Ubuntu 20.04、php、Apache 和 mySQL 设置了一个新的 AWS EC2 实例。 I also installed N-Able (Solarwinds) server backup.我还安装了 N-Able (Solarwinds) 服务器备份。

I am able to do system and file backups but the mySQL backup fails.我能够进行系统和文件备份,但 mySQL 备份失败。 N-Able uses Percona XtraBackup for this function. N-Able 使用 Percona XtraBackup 来实现这个功能。 N-Able support was able to narrow this down to the version check. N-Able 支持能够将范围缩小到版本检查。 Percona claims support mySQL 8.0, but their version check code fails current mySQL (8.0.27). Percona 声称支持 mySQL 8.0,但他们的版本检查代码未能通过当前的 mySQL (8.0.27)。 Percona release notes only references 8.0.26. Percona 发行说明仅引用 8.0.26。

When I do "sudo apt install mysql-server" I get 8.0.27.当我执行“sudo apt install mysql-server”时,我得到 8.0.27。 How can I downgrade that to 8.0.26?如何将其降级到 8.0.26?

setup 1 download 8.0.26设置 1 下载 8.0.26
address: https://downloads.mysql.com/archives/community/地址: https : //downloads.mysql.com/archives/community/

Product Version:8.0.26产品版本:8.0.26
Operating System:Ubuntu Linux操作系统:Ubuntu Linux
OS Version:Ubuntu Linux 20.04 (x86, 64-bit)操作系统版本:Ubuntu Linux 20.04(x86,64 位)

chose DEB Bundle选择了 DEB 包

First of all, in-place downgrades with MySQL 8.0 is not supported:首先,不支持 MySQL 8.0 就地降级:

"Downgrade from MySQL 8.0 to MySQL 5.7, or from a MySQL 8.0 release to a previous MySQL 8.0 release, is not supported. The only supported alternative is to restore a backup taken before upgrading. It is therefore imperative that you back up your data before starting the upgrade process." “不支持从 MySQL 8.0 降级到 MySQL 5.7,或从 MySQL 8.0 版本降级到以前的 MySQL 8.0 版本。唯一支持的替代方法是恢复升级前的备份。因此,您必须在升级之前备份数据开始升级过程。” Source: https://dev.mysql.com/doc/refman/8.0/en/downgrading.html来源: https : //dev.mysql.com/doc/refman/8.0/en/downgrading.html

So what you can do now is use mysqldump to make a full logical backup of your databases, then uninstall the MySQL 8.0.27 packages, remove your datadir (defaults to /var/lib/mysql/ ), install the mysql 8.0.26 packages and then restore your databases from the logical backup.所以你现在可以做的是使用mysqldump对你的数据库进行完整的逻辑备份,然后卸载 MySQL 8.0.27 包,删除你的 datadir(默认为/var/lib/mysql/ ),安装 mysql 8.0.26 包然后从逻辑备份恢复您的数据库。

Something like: mysqldump -uroot -p --all-databases > /tmp/all-databases.sql sudo apt-get uninstall mysql-server sudo rm -rf /var/lib/mysql sudo apt-get install mysql-server=8.0.26类似于:mysqldump -uroot -p --all-databases > /tmp/all-databases.sql sudo apt-get uninstall mysql-server sudo rm -rf /var/lib/mysql sudo apt-get install mysql-server=8.0 .26

Disclaimer: I've typed this from memory while on a mobile phone, so can't guarantee the accuracy and safety of the above commands.免责声明:这是我在手机上凭记忆键入的,因此无法保证上述命令的准确性和安全性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM