関連するかも情報 |
$ 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
 元の画像を見る
[t] 2022-01-18 08:47:56
|
あらー(・_・;)
dpkg: 警告: mariadb-server-10.3 の削除中、ディレクトリ '/etc/mysql' が空でないため削除できませんでした
[t] 2022-01-18 08:48:16
|
パッケージはもうない。
$ dpkg -l | egrep "mariadb|mysql" | wc -l 0
[t] 2022-01-18 08:49:15
|
ディレクトリ /etc/mysql を削除できなかったのは FROZEN シンボリックリンクが残っていたから。
$ ls /etc/mysql FROZEN
[t] 2022-01-18 08:50:31
|
$ sudo rm -rf /etc/mysql/
[t] 2022-01-18 08:51:51
|
こんなのも残ってた。
dpkg: 警告: mysql-server-core-8.0 の削除中、ディレクトリ '/usr/share/mysql' が空でないため削除できませんでした
$ ls /usr/share/mysql debian-10.5.flag
削除しちゃおう。
$ sudo rm -rf /usr/share/mysql
[t] 2022-01-18 08:53:09
|
作業開始から1時間ぐらいかかっているな・・・
[t] 2022-01-18 08:53:39
|
Ubuntu 21.04 (Hirsute Hippo) に MySQL をインストールする。
[t] 2022-01-18 08:59:04
|
$ sudo apt install mysql-server (中略) 以下のパッケージが新たにインストールされます: (中略) mecab-ipadic-utf8 mecab-utils mysql-client-8.0 mysql-client-core-8.0 mysql-common mysql-server mysql-server-8.0 mysql-server-core-8.0
[t] 2022-01-18 08:59:19
|
あれ、MySQL 管理者パスワードの設定とかなかったっけ・・・するっとインストールされた。STATE が bad になっとる。
$ systemctl list-unit-files | grep mysql mysql.service enabled enabled mysqld.service bad enabled
[t] 2022-01-18 09:02:04
|
えー(;´∀`)
「あ、なんかシンボリックリンクが………。mysql.serviceとかがmariadbを見てる」
CentOS7の自動起動設定でエラーが出た時の対処法 - Qiita https://qiita.com/binthec/items/32c62a8c776ce4aef8ce
[t] 2022-01-18 09:05:35
|
$ ls -la /etc/systemd/system してみたら /etc/systemd/system/mysqld.service -> /lib/systemd/system/mariadb.service になってた。
$ sudo unlink /etc/systemd/system/mysqld.service
[t] 2022-01-18 09:13:06
|
いったんまっさらに
$ sudo apt remove --purge mysql-server
$ sudo apt autoremove
$ dpkg -l | grep mysql
$ sudo apt purge mysql-common mysql-server-8.0
dpkg: 警告: mysql-common の削除中、ディレクトリ '/etc/mysql' が空でないため削除できませんでした
$ sudo rm -rf /etc/mysql/
[t] 2022-01-18 09:13:18
|
Ubuntu 21.04 (Hirsute Hippo) に MySQL をインストールする三度目の挑戦。
$ sudo apt install mysql-server
[t] 2022-01-18 09:14:32
|
あれっ・・・
$ systemctl list-unit-files | egrep "mysql|mariadb" mysql.service enabled enabled
$ sudo systemctl start mysqld Failed to start mysqld.service: Unit mysqld.service not found.
[t] 2022-01-18 09:16:37
|
$ dpkg -l | grep mysql | col | cut -f 1 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 09:17:51
|
$ mysql --version mysql Ver 8.0.27-0ubuntu0.21.04.1 for Linux on x86_64 ((Ubuntu))
[t] 2022-01-18 09:18:15
|
もしかして mysqld.service は要らなかった?
$ sudo systemctl status mysql ● mysql.service - MySQL Community Server
[t] 2022-01-18 09:19:15
|