NI-Lab.

nilog:

← 前の日 2022-01-18 次の日 →
← 一年前 一年後 →
Twitter (2022-01-18)
どうしますか? 以下の選択肢があります:
Y か I : パッケージメンテナのバージョンをインストールする
N か O : 現在インストールされている自分のバージョンを残す
D : 両バージョンの差異を表示する
Z : 状況を調査するためにシェルを開始する
[t] 2022-01-18 08:15:13
関連するかも情報
今回の環境では設定はいじっていないのでYかな。

設定ファイル '/etc/init.d/mysql'
==> これはインストールしてから (あなたかスクリプトによって) 変更されています。
==> パッケージ配布元が更新版を提供しています。
[t] 2022-01-18 08:15:03
どうしますか? 以下の選択肢があります:
Y か I : パッケージメンテナのバージョンをインストールする
N か O : 現在インストールされている自分のバージョンを残す
D : 両バージョンの差異を表示する
Z : 状況を調査するためにシェルを開始する
[t] 2022-01-18 08:15:13
こっちもいじっていないはずなのでYで。

設定ファイル '/etc/logrotate.d/mysql-server'
==> これはインストールしてから (あなたかスクリプトによって) 削除されています。
==> パッケージ配布元が更新版を提供しています。
[t] 2022-01-18 08:15:32
新バージョンの設定ファイル /etc/logrotate.d/mysql-server をインストールしています ...
新バージョンの設定ファイル /etc/mysql/debian-start をインストールしています ...
[t] 2022-01-18 08:15:59
あら・・・

MySQL has been frozen to prevent damage to your system. Please see /etc/mysql/FROZEN for help.

mysql-server (8.0.27-0ubuntu0.21.04.1) を設定しています ...
[t] 2022-01-18 08:17:26
mariadb のパッケージが残ってる。

$ dpkg -l | egrep "mariadb|mysql" | grep ^i | col | cut -f 1
(中略)
ii mariadb-common
ii mysql-client-8.0
ii mysql-client-core-8.0
ii mysql-common
ii mysql-server
ii mysql-server-8.0
ii mysql-server-core-8.0
[t] 2022-01-18 08:26:10
/etc/mysql/FROZEN を見ると、

This MySQL or variant installation has entered "frozen mode". Maintainer scripts will avoid making changes or starting the daemon until manually released from this state. See /usr/share/doc/mysql-common/README for general information about this mode.
[t] 2022-01-18 08:28:25
MariaDB から MySQL へはダウングレードしたみたいになってる。

In this particular case, an incompatible downgrade attempt has been detected. This can be resolved in one of two ways:
[t] 2022-01-18 08:29:02
【話題のキーワード】
1. マンモス
2. 前田大然
3. 285ヘクタール
4. ワクチンパッケージ
5. 松嶋菜々子
6. 雪降ってる
7. サポート詐欺
8. 阪急千里線
https://search.yahoo.co.jp/realtime #buzzbot
[t] 2022-01-18 08:30:56
データをなんとかしないと。

1. Change the contents of /var/lib/mysql/ to contain database data that is compatible with the currently installed MySQL or variant daemon version.
[t] 2022-01-18 08:31:31
やっぱり、ダンプしておいたデータを入れ直すのが良さそうかな・・・

For example: you could restore from a backup. Alternatively you could do a dump using a future version binary and then a restore using the current version binary.
[t] 2022-01-18 08:32:09
MySQL ダウングレードな方法も。

2. Switch to a MySQL or variant daemon version that is compatible with the data currently in /var/lib/mysql/. For example, if you have attempted a downgrade from mysql-server-5.7 to mysql-server-5.6, you could "apt install mysql-server-5.7" again.
[t] 2022-01-18 08:33:39
解決したら /etc/mysql/FROZEN シンボリックリンクを削除する必要あり。

Please resolve this situation and only then remove the /etc/mysql/FROZEN symlink. You can then run "dpkg-reconfigure <package>" where <package> should usually be in the form <variant>-server-<version>.
[t] 2022-01-18 08:34:30
結論としては、MariaDB が入っている Ubuntu 21.04 (Hirsute Hippo) にそのまま MySQL をインストールしようとすると、データの互換性が不十分でセットアップが完了しない、と。
[t] 2022-01-18 08:35:39
設定ファイルは残ってるぽい。

$ dpkg -l | egrep "mariadb|mysql" | grep ^r | col | cut -f 1
rc mariadb-client-10.3
rc mariadb-client-10.5
rc mariadb-server-10.3
rc mariadb-server-10.5
[t] 2022-01-18 08:39:58
rc はパッケージ削除されたけど設定ファイルが残っている状態、らしい。

Desired action:
i = Install
r = Remove
p = Purge

Package status:
n = Not-installed
c = Config-files
i = Installed

dpkg-query(1) — dpkg — Debian jessie — Debian Manpages https://manpages.debian.org/jessie/dpkg/dpkg-query.1.en.html
[t] 2022-01-18 08:41:07
$ sudo apt purge mysql-server mariadb-common ってやったけど特定のパッケージしか消えない・・・
[t] 2022-01-18 08:43:54
apt remove のほうがよかったのかな
[t] 2022-01-18 08:44:35
Arrivederci!

$ sudo apt purge mariadb-client-10.3 mariadb-client-10.5 mariadb-server-10.3 mariadb-server-10.5 mysql-client-8.0 mysql-client-core-8.0 mysql-common mysql-server-8.0 mysql-server-core-8.0 https://twitter.com/nilab/status/1483224600318459904/photo/1
Arrivederci!  $ sudo apt purge mariadb-client-10.3 mariadb-client-10.5 mariadb-server-10.3 mariadb-server-10.5 mysql-client-8.0 mysql-client-core-8.0 mysql-common mysql-server-8.0 mysql-server-core-8.0
元の画像を見る
[t] 2022-01-18 08:47:56
あらー(・_・;)

dpkg: 警告: mariadb-server-10.3 の削除中、ディレクトリ '/etc/mysql' が空でないため削除できませんでした
[t] 2022-01-18 08:48:16
2022年01年18日のnilogをすべて表示する

- NI-Lab.
- Mastodon (@nilab@mastodon-japan.net)
- Twitter (@nilab)
- Timelog (@nilab)
- はてなブックマーク (id:nilab)

Web Services by Yahoo! JAPAN