要升级 Ubuntu,提示 MySQL 有问题。

2022-09-18 00:21:41 +08:00
 likunyan
root@example:~# do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
root@example:~# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  mysql-client mysql-server
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

这个是什么意思昂

2044 次点击
所在节点    MySQL
5 条回复
akira
2022-09-18 01:53:47 +08:00
他只是保留老版本 ,没有啥问题啊。。
如果你需要对 mysql 也升级的话,手动 upgrade 或者 upgrade 的时候允许安装新 pkg 就好了
msg7086
2022-09-18 02:51:43 +08:00
apt install mysql-client mysql-server
ruidoBlanco
2022-09-18 05:16:10 +08:00
数据库大版本升级是个坑,哪里能随便升级的?查下数据库自己的文档就知道了,我记得很多时候需要完整备份然后在新版本导入的。Ubuntu 能替你保留旧版本,我觉得是很走心了。
likunyan
2022-09-18 10:16:15 +08:00
@msg7086 这个有试过,我的 MySQL 版本是 mysql Ver 8.0.27 for Linux on x86_64 (MySQL Community Server - GPL)

```
root@example:~# apt install mysql-client mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mysql-client : Depends: mysql-client-8.0 but it is not going to be installed
mysql-server : Depends: mysql-server-8.0 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
```
likunyan
2022-09-18 10:17:24 +08:00
@ruidoBlanco 是的,最后的办法就是重新导入了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/880920

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX