ubuntuusers.de

MySQL Server in "frozen mode"

Status: Gelöst | Ubuntu-Version: Ubuntu GNOME 20.04 (Focal Fossa)
Antworten |

Anark

Anmeldungsdatum:
9. August 2006

Beiträge: 91

Vor einiger Zeit versuchte ich auf einem Ubuntu 20.4 Desktop einen LAMP Stack zu installieren. Das Vorhaben schlug fehl, ich verfolgte die Sache nicht weiter, und kam erst gestern darauf zurück: zuerst machte ich alle apt install Befehle mit apt remove rückgängig, dann entschied ich mich statt MySQL MariaDB zu installieren.

Dies schlug fehl, weil ich MySQL offenbar nicht vollständig entfernt hatte. Das System inbterpretierte den Versuch MariaDB zu installieren als unzulässigen Dowgrade von mysql-server-8.0 und versetzte deshalb MySQL in "frozen mode".

Aus diesem Schlamassel komme ich nun nicht mehr heraus.

Hier ist die Fehlermeldung:

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.

In this particular case, an incompatible downgrade attempt has been
detected. This can be resolved in one of two ways:

1. Change the contents of /var/lib/mysql/ to contain database data that
is compatible with the currently installed MySQL or variant daemon
version. 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.

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.

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>.

Damit kann ich leider nichts anfangen.

Der Versuch, MySQL zu enfernen und von neuem zu installieren geht auch auf verschiedenste Weisen in die Hose. Hier ist eine davon mit einer typischen Fehlermeldung:

$ sudo apt autoremove --purge mysql-server-8.0
[sudo] password for anark: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  mecab-ipadic* mecab-ipadic-utf8* mecab-utils* mysql-server-8.0*
0 to upgrade, 0 to newly install, 4 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 56.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 282033 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-server-8.0 (--remove):
 installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error while cleaning up:
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 mysql-server-8.0
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Besten Dank für jede Anregung!

Moderiert von ChickenLipsRfun2eat:

Thema in einen passenden Forenbereich verschoben. Bitte beachte die als wichtig markierten Themen („Welche Themen gehören hier her und welche nicht?“) in jedem Forenbereich. Danke.

Doc_Symbiosis

Avatar von Doc_Symbiosis

Anmeldungsdatum:
11. Oktober 2006

Beiträge: 4450

Wohnort: Göttingen

Stoppe mysql manuell und probier es dann nochmal:

sudo systemctl stop mysqld

Und schaue dann, ob wirklich nichts mehr davon läuft, ansonsten kille entsprechenden Prozeß

ps aux | grep -i sql

Anark

(Themenstarter)

Anmeldungsdatum:
9. August 2006

Beiträge: 91

Danke!

anark@delta:/usr/share/doc/mysql-common/frozen-mode$ sudo systemctl stop mysqld
Failed to stop mysqld.service: Unit mysqld.service not loaded.
anark@delta:/usr/share/doc/mysql-common/frozen-mode$ ps aux | grep -i sql
anark     40388  0.0  0.0  17544   724 pts/0    S+   22:11   0:00 grep --color=auto -i sql

Gibt das etwas her?

Doc_Symbiosis

Avatar von Doc_Symbiosis

Anmeldungsdatum:
11. Oktober 2006

Beiträge: 4450

Wohnort: Göttingen

Hm, also mysql läuft schonmal nicht mehr.

Dann probier mal folgendes:

sudo apt -f install

Anark

(Themenstarter)

Anmeldungsdatum:
9. August 2006

Beiträge: 91

$ sudo apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 6221
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 mysql-server-8.0
E: Sub-process /usr/bin/dpkg returned an error code (1)

mysqld läuft. Soll ich versuchen, den Server zu deinstallieren?

Anark

(Themenstarter)

Anmeldungsdatum:
9. August 2006

Beiträge: 91

Es ist mir gelungen, die verbleibenden mariadb-Pakete und mysql-server-8.0 zu entfernen:

anark@delta:~$ sudo dpkg -l | grep mariadb
rc  mariadb-client-10.3                               1:10.3.31-0ubuntu0.20.04.1                                                      amd64        MariaDB database client binaries
rc  mariadb-common                                    1:10.3.31-0ubuntu0.20.04.1                                                      all          MariaDB common metapackage
rc  mariadb-server-10.3                               1:10.3.31-0ubuntu0.20.04.1                                                      amd64        MariaDB database server binaries
anark@delta:~$ sudo dpkg --force-all -P mariadb-server-10.3
(Reading database ... 282036 files and directories currently installed.)
Purging configuration files for mariadb-server-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
anark@delta:~$ sudo dpkg --force-all -P mariadb-common
(Reading database ... 282029 files and directories currently installed.)
Purging configuration files for mariadb-common (1:10.3.31-0ubuntu0.20.04.1) ...
anark@delta:~$ sudo dpkg --force-all -P mariadb-client-10.3
(Reading database ... 282028 files and directories currently installed.)
Purging configuration files for mariadb-client-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
anark@delta:~$ sudo apt-get --reinstall install mysql-server-8.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for mysql-server-8.0:amd64
anark@delta:~$ sudo apt-get remove mysql-server-8.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  mysql-server-8.0
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 1’536 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 282025 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
anark@delta:~$ ps aux | grep -i sql
anark     15078  0.0  0.0  17544   664 pts/0    S+   13:42   0:00 grep --color=auto -i sql
anark@delta:~$ 

Jetzt müsste ich eigentlich MariaDB neu installieren können.

Anark

(Themenstarter)

Anmeldungsdatum:
9. August 2006

Beiträge: 91

... Das hat nicht geklappt. Die Neuinstallation von MariaDB blieb bei 90% hängen:

anark@delta:~$ systemctl status mysql
● mysql.service
     Loaded: masked (Reason: Unit mysql.service is masked.)
     Active: inactive (dead)
anark@delta:~$ systemctl status mariadb
Unit mariadb.service could not be found.
anark@delta:~$ sudo apt install mariadb-server mariadb-client
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libevent-core-2.1-7 libevent-pthreads-2.1-7
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  galera-3 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libreadline5
  libterm-readkey-perl mariadb-client-10.3 mariadb-client-core-10.3
  mariadb-common mariadb-server-10.3 mariadb-server-core-10.3 socat
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl mailx
  mariadb-test tinyca
The following packages will be REMOVED
  mysql-client-8.0 mysql-client-core-8.0 mysql-server-core-8.0
The following NEW packages will be installed
  galera-3 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libreadline5
  libterm-readkey-perl mariadb-client mariadb-client-10.3
  mariadb-client-core-10.3 mariadb-common mariadb-server mariadb-server-10.3
  mariadb-server-core-10.3 socat
0 to upgrade, 14 to newly install, 3 to remove and 0 not to upgrade.
Need to get 2’215 kB/19.4 MB of archives.
After this operation, 37.4 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://ch.archive.ubuntu.com/ubuntu focal-updates/universe amd64 mariadb-common all 1:10.3.31-0ubuntu0.20.04.1 [15.9 kB]
Get:2 http://ch.archive.ubuntu.com/ubuntu focal/universe amd64 galera-3 amd64 25.3.29-1 [898 kB]
Get:3 http://ch.archive.ubuntu.com/ubuntu focal-updates/main amd64 libdbi-perl amd64 1.643-1ubuntu0.1 [730 kB]
Get:4 http://ch.archive.ubuntu.com/ubuntu focal/main amd64 libconfig-inifiles-perl all 3.000002-1 [40.6 kB]
Get:5 http://ch.archive.ubuntu.com/ubuntu focal/main amd64 libreadline5 amd64 5.2+dfsg-3build3 [100 kB]
Get:6 http://ch.archive.ubuntu.com/ubuntu focal/main amd64 socat amd64 1.7.3.3-2 [323 kB]
Get:7 http://ch.archive.ubuntu.com/ubuntu focal/universe amd64 libdbd-mysql-perl amd64 4.050-3 [82.8 kB]
Get:8 http://ch.archive.ubuntu.com/ubuntu focal/main amd64 libterm-readkey-perl amd64 2.38-1build1 [24.6 kB]
Fetched 2’215 kB in 1s (4’163 kB/s)              
Preconfiguring packages ...
(Reading database ... 282004 files and directories currently installed.)
Removing mysql-client-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Removing mysql-client-core-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Removing mysql-server-core-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Selecting previously unselected package mariadb-common.
(Reading database ... 281812 files and directories currently installed.)
Preparing to unpack .../0-mariadb-common_1%3a10.3.31-0ubuntu0.20.04.1_all.deb .
..
Unpacking mariadb-common (1:10.3.31-0ubuntu0.20.04.1) ...
Selecting previously unselected package galera-3.
Preparing to unpack .../1-galera-3_25.3.29-1_amd64.deb ...
Unpacking galera-3 (25.3.29-1) ...
Selecting previously unselected package libdbi-perl:amd64.
Preparing to unpack .../2-libdbi-perl_1.643-1ubuntu0.1_amd64.deb ...
Unpacking libdbi-perl:amd64 (1.643-1ubuntu0.1) ...
Selecting previously unselected package libconfig-inifiles-perl.
Preparing to unpack .../3-libconfig-inifiles-perl_3.000002-1_all.deb ...
Unpacking libconfig-inifiles-perl (3.000002-1) ...
Selecting previously unselected package libreadline5:amd64.
Preparing to unpack .../4-libreadline5_5.2+dfsg-3build3_amd64.deb ...
Unpacking libreadline5:amd64 (5.2+dfsg-3build3) ...
Selecting previously unselected package mariadb-client-core-10.3.
Preparing to unpack .../5-mariadb-client-core-10.3_1%3a10.3.31-0ubuntu0.20.04.1
_amd64.deb ...
Unpacking mariadb-client-core-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Selecting previously unselected package mariadb-client-10.3.
Preparing to unpack .../6-mariadb-client-10.3_1%3a10.3.31-0ubuntu0.20.04.1_amd6
4.deb ...
Unpacking mariadb-client-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Selecting previously unselected package mariadb-server-core-10.3.
Preparing to unpack .../7-mariadb-server-core-10.3_1%3a10.3.31-0ubuntu0.20.04.1
_amd64.deb ...
Unpacking mariadb-server-core-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Selecting previously unselected package socat.
Preparing to unpack .../8-socat_1.7.3.3-2_amd64.deb ...
Unpacking socat (1.7.3.3-2) ...
Setting up mariadb-common (1:10.3.31-0ubuntu0.20.04.1) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf 
(my.cnf) in auto mode
Selecting previously unselected package mariadb-server-10.3.
(Reading database ... 282189 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.3_1%3a10.3.31-0ubuntu0.20.04.1_amd64.
deb ...
Unpacking mariadb-server-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Selecting previously unselected package libdbd-mysql-perl:amd64.
Preparing to unpack .../libdbd-mysql-perl_4.050-3_amd64.deb ...
Unpacking libdbd-mysql-perl:amd64 (4.050-3) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.38-1build1_amd64.deb ...
Unpacking libterm-readkey-perl (2.38-1build1) ...
Selecting previously unselected package mariadb-client.
Preparing to unpack .../mariadb-client_1%3a10.3.31-0ubuntu0.20.04.1_all.deb ...
Unpacking mariadb-client (1:10.3.31-0ubuntu0.20.04.1) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../mariadb-server_1%3a10.3.31-0ubuntu0.20.04.1_all.deb ...
Unpacking mariadb-server (1:10.3.31-0ubuntu0.20.04.1) ...
Setting up libconfig-inifiles-perl (3.000002-1) ...
Setting up libreadline5:amd64 (5.2+dfsg-3build3) ...
Setting up socat (1.7.3.3-2) ...
Setting up mariadb-server-core-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Setting up galera-3 (25.3.29-1) ...
Setting up mariadb-client-core-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Setting up libterm-readkey-perl (2.38-1build1) ...
Setting up libdbi-perl:amd64 (1.643-1ubuntu0.1) ...
Setting up mariadb-client-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Setting up libdbd-mysql-perl:amd64 (4.050-3) ...
Setting up mariadb-server-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
Created symlink /etc/systemd/system/mysql.service → /lib/systemd/system/mariadb
.service.
Created symlink /etc/systemd/system/mysqld.service → /lib/systemd/system/mariad
b.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /
lib/systemd/system/mariadb.service.

Progress: [ 90%] [###################################################......] 

Anark

(Themenstarter)

Anmeldungsdatum:
9. August 2006

Beiträge: 91

Tja, solange es funktioniert ist es mir eigentlich Wurst, ob ich eine MariaDB oder MySQL Datenbank verwende. Nachdem die MariaDB-Installation nicht funktioniert hatte, deinstallierte ich also MariaDB mit sudo apt remove mariadb-server mariadb-client und versuchte darauf den mysql-server zu installieren. Der Installations-Prozess entfernte ein paar zurückgebliebene MariaDB-Pakete und versetzte dann den MySQL Server prompt wieder in den "frozen mode":

$ sudo apt-get install php
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php is already the newest version (2:7.4+75).
The following packages were automatically installed and are no longer required:
  libevent-core-2.1-7 libevent-pthreads-2.1-7
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
rudolf@delta:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  libevent-core-2.1-7 libevent-pthreads-2.1-7
0 to upgrade, 0 to newly install, 2 to remove and 0 not to upgrade.
After this operation, 319 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 282333 files and directories currently installed.)
Removing libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ...
Removing libevent-core-2.1-7:amd64 (2.1.11-stable-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
rudolf@delta:~$ sudo apt-get install php-mysql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php7.4-mysql
The following NEW packages will be installed
  php-mysql php7.4-mysql
0 to upgrade, 2 to newly install, 0 to remove and 0 not to upgrade.
Need to get 120 kB/122 kB of archives.
After this operation, 487 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ch.archive.ubuntu.com/ubuntu focal-updates/main amd64 php7.4-mysql amd64 7.4.3-4ubuntu2.5 [120 kB]
Fetched 120 kB in 0s (509 kB/s)         
Selecting previously unselected package php7.4-mysql.
(Reading database ... 282323 files and directories currently installed.)
Preparing to unpack .../php7.4-mysql_7.4.3-4ubuntu2.5_amd64.deb ...
Unpacking php7.4-mysql (7.4.3-4ubuntu2.5) ...
Selecting previously unselected package php-mysql.
Preparing to unpack .../php-mysql_2%3a7.4+75_all.deb ...
Unpacking php-mysql (2:7.4+75) ...
Setting up php7.4-mysql (7.4.3-4ubuntu2.5) ...
Setting up php-mysql (2:7.4+75) ...
Processing triggers for libapache2-mod-php7.4 (7.4.3-4ubuntu2.5) ...
Processing triggers for php7.4-cli (7.4.3-4ubuntu2.5) ...
rudolf@delta:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  galera-3 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libreadline5
  libterm-readkey-perl mariadb-common socat
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libevent-core-2.1-7 libevent-pthreads-2.1-7 mysql-client-8.0
  mysql-client-core-8.0 mysql-server-8.0 mysql-server-core-8.0
Suggested packages:
  mailx tinyca
The following packages will be REMOVED
  mariadb-client-10.3 mariadb-client-core-10.3 mariadb-server-10.3
  mariadb-server-core-10.3
The following NEW packages will be installed
  libevent-core-2.1-7 libevent-pthreads-2.1-7 mysql-client-8.0
  mysql-client-core-8.0 mysql-server mysql-server-8.0 mysql-server-core-8.0
0 to upgrade, 7 to newly install, 4 to remove and 0 not to upgrade.
Need to get 96.5 kB/24.1 MB of archives.
After this operation, 46.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ch.archive.ubuntu.com/ubuntu focal/main amd64 libevent-core-2.1-7 amd64 2.1.11-stable-1 [89.1 kB]
Get:2 http://ch.archive.ubuntu.com/ubuntu focal/main amd64 libevent-pthreads-2.1-7 amd64 2.1.11-stable-1 [7’372 B]
Fetched 96.5 kB in 2s (60.1 kB/s)                       
Preconfiguring packages ...
(Reading database ... 282339 files and directories currently installed.)
Removing mariadb-server-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Removing mariadb-client-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Removing mariadb-client-core-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Removing mariadb-server-core-10.3 (1:10.3.31-0ubuntu0.20.04.1) ...
Selecting previously unselected package mysql-client-core-8.0.
(Reading database ... 282073 files and directories currently installed.)
Preparing to unpack .../0-mysql-client-core-8.0_8.0.26-0ubuntu0.20.04.2_amd64.deb ...
Unpacking mysql-client-core-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Selecting previously unselected package mysql-client-8.0.
Preparing to unpack .../1-mysql-client-8.0_8.0.26-0ubuntu0.20.04.2_amd64.deb ...
Unpacking mysql-client-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Selecting previously unselected package libevent-core-2.1-7:amd64.
Preparing to unpack .../2-libevent-core-2.1-7_2.1.11-stable-1_amd64.deb ...
Unpacking libevent-core-2.1-7:amd64 (2.1.11-stable-1) ...
Selecting previously unselected package libevent-pthreads-2.1-7:amd64.
Preparing to unpack .../3-libevent-pthreads-2.1-7_2.1.11-stable-1_amd64.deb ...
Unpacking libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ...
Selecting previously unselected package mysql-server-core-8.0.
Preparing to unpack .../4-mysql-server-core-8.0_8.0.26-0ubuntu0.20.04.2_amd64.deb ...
Unpacking mysql-server-core-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Selecting previously unselected package mysql-server-8.0.
Preparing to unpack .../5-mysql-server-8.0_8.0.26-0ubuntu0.20.04.2_amd64.deb ...
Downgrade from (at least) 10.3 to 5.7 is not possible.
MySQL has been frozen to prevent damage to your system. Please see /etc/mysql/FROZEN for help.
Unpacking mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../6-mysql-server_8.0.26-0ubuntu0.20.04.2_all.deb ...
Unpacking mysql-server (8.0.26-0ubuntu0.20.04.2) ...
Setting up mysql-client-core-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Setting up libevent-core-2.1-7:amd64 (2.1.11-stable-1) ...
Setting up mysql-client-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Setting up libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ...
Setting up mysql-server-core-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Setting up mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
MySQL has been frozen to prevent damage to your system. Please see /etc/mysql/FROZEN for help.
Setting up mysql-server (8.0.26-0ubuntu0.20.04.2) ...
Processing triggers for systemd (245.4-4ubuntu3.11) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...

Doc_Symbiosis

Avatar von Doc_Symbiosis

Anmeldungsdatum:
11. Oktober 2006

Beiträge: 4450

Wohnort: Göttingen

Verwende zum Entfernen mal purge statt remove.

Und schau mal nach dem Entfernen, ob wirklich alles von mysql weg ist, insbesondere /var/lib/mysql und etwaige Reste in /etc.

Anark

(Themenstarter)

Anmeldungsdatum:
9. August 2006

Beiträge: 91

Nein, das funktioniert auch nicht.

Hier sind die Pakete, die nach der Deinstallation von MariaDB und MySQL Server zurückgeblieben sind:

anark@delta:~$ sudo dpkg -l | grep mariadb
rc  mariadb-client-10.3                               1:10.3.31-0ubuntu0.20.04.1                                                      amd64        MariaDB database client binaries
ii  mariadb-common                                    1:10.3.31-0ubuntu0.20.04.1                                                      all          MariaDB common metapackage
rc  mariadb-server-10.3                               1:10.3.31-0ubuntu0.20.04.1                                                      amd64        MariaDB database server binaries

anark@delta:~$ sudo dpkg -l | grep mysql-server
ii  mysql-server-8.0                                  8.0.26-0ubuntu0.20.04.2                                                         amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-8.0                             8.0.26-0ubuntu0.20.04.2                                                         amd64        MySQL database server binaries
anark@delta:~$ 

Von den beiden liess sich nur mysql-server-core-8.0 entfernen:

anark@delta:~$ sudo dpkg --force-all -P mysql-server-8.0 mysql-server-core-8.0
(Reading database ... 282296 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-server-8.0 (--purge):
 installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error while cleaning up:
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: mysql-server-core-8.0: dependency problems, but removing anyway as you requested:
 mysql-server-8.0 depends on mysql-server-core-8.0 (= 8.0.26-0ubuntu0.20.04.2).

Removing mysql-server-core-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 mysql-server-8.0
anark@delta:~$ sudo dpkg -l | grep mysql-server
pF  mysql-server-8.0                                  8.0.26-0ubuntu0.20.04.2                                                         amd64        MySQL database server binaries and system database setup

Purge statt remove:

anark@delta:~$ sudo apt-get purge mysql-server-8.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  galera-3 libaio1 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libreadline5 libterm-readkey-perl mariadb-common
  mysql-client-8.0 mysql-client-core-8.0 socat
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
  mysql-server-8.0*
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 1’536 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 282147 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.26-0ubuntu0.20.04.2) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-server-8.0 (--remove):
 installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Failed to start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error while cleaning up:
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 mysql-server-8.0
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
anark@delta:~$ sudo dpkg -l | grep mysql-server
pF  mysql-server-8.0   

Anark

(Themenstarter)

Anmeldungsdatum:
9. August 2006

Beiträge: 91

Ich hab's noch einmal versucht, und dann ging's plötzlich.

Diese Suche nach verbleibenden mysql-server Paketen:

$ sudo dpkg -l | grep mysql-server

Ergab zwei davon, mysql-server-8.0 und mysql-server-core-8.0

Die ließen sich so entfernen:

$ sudo apt-get purge mysql-server-8.0
$ sudo apt-get purge mysql-server-core-8.0
$ sudo apt autoremove

Danach ließ sich MariaDB problemlos installieren.

Vielen Dank für die Hilfe, Doc_Symbiosis!

Antworten |