在 bionic 上将 mysql 5.7 升级到 8.0 时收到警告!

在 bionic 上将 mysql 5.7 升级到 8.0 时收到警告!

我已经安装了客户端和服务器的MySQL 5.7版本。

当我检查可用的 MySQL 包时:

$ sudo apt search mysql
mysql-client/bionic-updates,bionic-security 5.7.24-0ubuntu0.18.04.1 amd64 [installed]
  MySQL Client meta package depending on latest version

mysql-client-5.7/bionic-updates,bionic-security 5.7.24-0ubuntu0.18.04.1 amd64 [installed]
  MySQL database client binaries

mysql-client-core-5.7/bionic-updates,bionic-security 5.7.24-0ubuntu0.18.04.1 amd64 [installed]
  MySQL database core client binaries

mysql-server/bionic-updates,bionic-security 5.7.24-0ubuntu0.18.04.1 amd64 [installed]
  MySQL Server meta package depending on latest version

mysql-server-5.7/bionic-updates,bionic-security,now 5.7.24-0ubuntu0.18.04.1 amd64 [installed]
  MySQL database server binaries and system database setup

mysql-server-core-5.7/bionic-updates,bionic-security 5.7.24-0ubuntu0.18.04.1 amd64 [installed]
  MySQL database server binaries

我尝试将 MySQL 从 5.7 升级到 8.0 版本,步骤如下:

1.下载存储库

$ wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb

2. 安装包并配置

$ sudo gdebi mysql-apt-config_0.8.10-1_all.deb  
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Reading state information... Done

Auto configuration for MySQL APT Repo.
 MySQL is a fast, stable and true multi-user, multi-threaded SQL database
 server. SQL (Structured Query Language) is the most popular database query
 language in the world. The main goals of MySQL are speed, robustness and
 ease of use.
Do you want to install the software package? [y/N]:y
Selecting previously unselected package mysql-apt-config.
(Reading database ... 232093 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.10-1_all.deb ...
Unpacking mysql-apt-config (0.8.10-1) ...
Setting up mysql-apt-config (0.8.10-1) ...
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
OK

我该如何修复警告并更新/升级我的所有数据库?询问是因为我忘记使用查询备份我的数据库mysqldump了!

答案1

这是一个表面警告,本质上抱怨脚本正在使用该apt-key命令,并且将来该命令可能会发生变化,因此脚本不应该使用它,因为它是为人类使用而设计的。

相关内容