ubuntuusers.de

LTS upgrade auf focal: mysql57>mysql80 und akonadi funktionieren nicht

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

floogy

Anmeldungsdatum:
21. Juli 2006

Beiträge: 3294

Wohnort: Koblenz

Hallo,

nach dem upgrade von 18.04.4 auf 20.04.2 wurde auch mysql upgegraded von 5.7 auf 8.0.

Leider funktioniert die automatische Konvertierung, das upgrade der Datenstrukturen nicht.

~$ akonadictl start Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

~$ org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/floogy/.local/share/akonadi/mysql.conf", "--datadir=/home/floogy/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: ""
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/user/1000/akonadi/mysql.socket' (2)'
Check that mysqld is running and that the socket: '/run/user/1000/akonadi/mysql.socket' exists!
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

~$ sudo service apparmor status

● apparmor.service - Load AppArmor profiles
     Loaded: loaded (/lib/systemd/system/apparmor.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sun 2021-05-02 22:06:26 CEST; 6s ago
       Docs: man:apparmor(7)
             https://gitlab.com/apparmor/apparmor/wikis/home/
    Process: 20403 ExecStart=/lib/apparmor/apparmor.systemd reload (code=exited, status=0/SUCCESS)
   Main PID: 20403 (code=exited, status=0/SUCCESS)

Mai 02 22:06:20 ubuntu apparmor.systemd[20418]: Warning: found usr.bin.freshclam in /etc/apparmor.d/force-complain, forcing complain mode
Mai 02 22:06:21 ubuntu apparmor.systemd[20418]: Warnung aus /etc/apparmor.d (/etc/apparmor.d/usr.bin.freshclam Zeile 48): Warning failed to create cache: usr.bin.freshclam
Mai 02 22:06:21 ubuntu apparmor.systemd[20428]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Mai 02 22:06:21 ubuntu apparmor.systemd[20431]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox-3.7
Mai 02 22:06:22 ubuntu apparmor.systemd[20438]: Warning: found usr.sbin.mysqld in /etc/apparmor.d/force-complain, forcing complain mode
Mai 02 22:06:22 ubuntu apparmor.systemd[20439]: Warning: found usr.sbin.ntpd in /etc/apparmor.d/force-complain, forcing complain mode
Mai 02 22:06:22 ubuntu apparmor.systemd[20438]: Warnung aus /etc/apparmor.d (/etc/apparmor.d/usr.sbin.mysqld Zeile 85): Warning failed to create cache: usr.sbin.mysqld
Mai 02 22:06:22 ubuntu apparmor.systemd[20439]: Warnung aus /etc/apparmor.d (/etc/apparmor.d/usr.sbin.ntpd Zeile 83): Warning failed to create cache: usr.sbin.ntpd
Mai 02 22:06:22 ubuntu apparmor.systemd[20448]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Mai 02 22:06:26 ubuntu systemd[1]: Finished Load AppArmor profiles.

~$ journalctl -xe

Mai 02 21:50:58 ubuntu systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An ExecStart= process belonging to unit mysql.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Mai 02 21:50:58 ubuntu systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
Mai 02 21:50:58 ubuntu systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit mysql.service has finished with a failure.
-- 
-- The job identifier is 17817 and the job result is failed.
Mai 02 21:50:58 ubuntu systemd[1]: mysql.service: Scheduled restart job, restart counter is at 88.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Mai 02 21:50:58 ubuntu systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A stop job for unit mysql.service has finished.
-- 
-- The job identifier is 17953 and the job result is done.
Mai 02 21:50:58 ubuntu systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit mysql.service has begun execution.
-- 
-- The job identifier is 17953.

~$ cat /etc/apparmor.d/mysqld_akonadi

#include <tunables/global>

@{xdg_data_home}=@{HOME}/.local/share

profile mysqld_akonadi {
  #include <abstractions/base>
  #include <abstractions/bash>
  #include <abstractions/consoles>
  #include <abstractions/nameservice>
  #include <abstractions/openssl>
  #include <abstractions/user-tmp>

  capability setgid,
  capability setuid,

  signal receive set=kill peer=/usr/bin/akonadiserver,
  signal receive set=term peer=/usr/bin/akonadiserver,

  /etc/mysql/ r,
  /etc/mysql/** r,
  /etc/my.cnf{,.d/**} r,
  @{sys}/devices/system/cpu/ r,
  /{usr/,}bin/{b,d}ash mrix,
  /{usr/,}bin/cat mrix,
  /{usr/,}bin/chmod mrix,
  /{usr/,}bin/dirname mrix,
  /{usr/,}bin/hostname mrix,
  /{usr/,}bin/mkdir mrix,
  /{usr/,}bin/sed mrix,
  /usr/bin/my_print_defaults mrix,
  /usr/bin/mysql_install_db mrix,
  /usr/bin/mysqladmin mrix,
  /usr/bin/mysqlcheck mrix,
  /usr/{,s}bin/mysqld mrix,
  /usr/share/mysql/** r,
  owner @{xdg_data_home}/akonadi/** rwk,
  owner @{PROC}/@{pid}/loginuid r,
  owner /{,var/}run/user/@{uid}/akonadi** rwk,
}

~$ cat -n /etc/apparmor.d/usr.sbin.mysqld

     
     1  # vim:syntax=apparmor
     2  # Last Modified: Tue Feb 09 15:28:30 2016
     3  #include <tunables/global>
     4
     5  /usr/sbin/mysqld {
     6    #include <abstractions/base>
     7    #include <abstractions/nameservice>
     8    #include <abstractions/user-tmp>
     9    #include <abstractions/mysql>
    10    #include <abstractions/winbind>
    11
    12  # Allow system resource access
    13    /proc/*/status r,
    14    /sys/devices/system/cpu/ r,
    15    /sys/devices/system/node/ r,
    16    /sys/devices/system/node/** r,
    17    capability sys_resource,
    18    capability dac_override,
    19    capability dac_read_search,
    20    capability setuid,
    21    capability setgid,
    22
    23  # Allow network access
    24    network tcp,
    25
    26    /etc/hosts.allow r,
    27    /etc/hosts.deny r,
    28
    29  # Allow config access
    30    /etc/mysql/** r,
    31
    32  # Allow pid, socket, socket lock file access
    33    /var/run/mysqld/mysqld.pid rw,
    34    /var/run/mysqld/mysqld.sock rw,
    35    /var/run/mysqld/mysqld.sock.lock rw,
    36    /var/run/mysqld/mysqlx.sock rw,
    37    /var/run/mysqld/mysqlx.sock.lock rw,
    38    /run/mysqld/mysqld.pid rw,
    39    /run/mysqld/mysqld.sock rw,
    40    /run/mysqld/mysqld.sock.lock rw,
    41    /run/mysqld/mysqlx.sock rw,
    42    /run/mysqld/mysqlx.sock.lock rw,
    43
    44  # Allow systemd notify messages
    45    /{,var/}run/systemd/notify w,
    46
    47  # Allow execution of server binary
    48    /usr/sbin/mysqld mr,
    49    /usr/sbin/mysqld-debug mr,
    50
    51  # Allow plugin access
    52    /usr/lib/mysql/plugin/ r,
    53    /usr/lib/mysql/plugin/*.so* mr,
    54
    55  # Allow error msg and charset access
    56    /usr/share/mysql/ r,
    57    /usr/share/mysql/** r,
    58
    59  # Allow data dir access
    60    /var/lib/mysql/ r,
    61    /var/lib/mysql/** rwk,
    62
    63  # Allow data files dir access
    64    /var/lib/mysql-files/ r,
    65    /var/lib/mysql-files/** rwk,
    66
    67  # Allow keyring dir access
    68    /var/lib/mysql-keyring/ r,
    69    /var/lib/mysql-keyring/** rwk,
    70
    71  # Allow log file access
    72    /var/log/mysql.err rw,
    73    /var/log/mysql.log rw,
    74    /var/log/mysql/ r,
    75    /var/log/mysql/** rw,
    76
    77  # Allow read access to mecab files
    78    /var/lib/mecab/dic/ipadic-utf8/** r,
    79
    80  # Allow read access to OpenSSL config
    81    /etc/ssl/openssl.cnf r,
    82    # Site-specific additions and overrides. See local/README for details.
    83    #include <local/usr.sbin.mysqld>
    84  }

~$ systemctl status mysql.service

          
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (start) since Sun 2021-05-02 23:43:55 CEST; 17s ago
    Process: 35892 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 35900 (mysqld)
     Status: "Data Dictionary upgrade from MySQL 5.7 in progress"
      Tasks: 32 (limit: 28438)
     Memory: 485.8M
     CGroup: /system.slice/mysql.service
             └─35900 /usr/sbin/mysqld

Mai 02 23:43:55 ubuntu systemd[1]: Starting MySQL Community Server...

~$ sudo mysql_upgrade

The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.

~$ tail -f /var/log/mysql/error.log

2021-05-02T21:45:21.432634Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.23-0ubuntu0.20.04.1)  (Ubuntu).
2021-05-02T21:45:21.991047Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23-0ubuntu0.20.04.1) starting as process 36058
2021-05-02T21:45:22.006291Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory.
2021-05-02T21:45:22.006403Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-05-02T21:45:30.684863Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-05-02T21:45:38.401195Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-05-02T21:45:42.655048Z 2 [Warning] [MY-010772] [Server] db.opt file not found for mythconverg database. Using default Character set.
2021-05-02T21:45:43.813605Z 2 [Warning] [MY-010772] [Server] db.opt file not found for pdns database. Using default Character set.
2021-05-02T21:45:45.849199Z 2 [Warning] [MY-010772] [Server] db.opt file not found for test database. Using default Character set.
2021-05-02T21:45:45.866032Z 2 [Warning] [MY-010772] [Server] db.opt file not found for zencart1 database. Using default Character set.
2021-05-02T21:45:46.099828Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`tax_rates`. Please dump/reload table to fix it!
2021-05-02T21:45:46.158703Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`specials`. Please dump/reload table to fix it!
2021-05-02T21:45:46.217059Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`salemaker_sales`. Please dump/reload table to fix it!
2021-05-02T21:45:46.752969Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`products_discount_quantity`. Please dump/reload table to fix it!
2021-05-02T21:45:46.828218Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`products_attributes`. Please dump/reload table to fix it!
2021-05-02T21:45:46.829095Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`products`. Please dump/reload table to fix it!
2021-05-02T21:45:46.954178Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`paypal_testing`. Please dump/reload table to fix it!
2021-05-02T21:45:47.120174Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`paypal`. Please dump/reload table to fix it!
2021-05-02T21:45:47.121038Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`orders_total`. Please dump/reload table to fix it!
2021-05-02T21:45:47.212361Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`orders_products_attributes`. Please dump/reload table to fix it!
2021-05-02T21:45:47.213236Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`orders_products`. Please dump/reload table to fix it!
2021-05-02T21:45:47.214152Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`orders`. Please dump/reload table to fix it!
2021-05-02T21:45:47.537557Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`group_pricing`. Please dump/reload table to fix it!
2021-05-02T21:45:47.962887Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`customers_wishlist`. Please dump/reload table to fix it!
2021-05-02T21:45:48.071275Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`customers_basket`. Please dump/reload table to fix it!
2021-05-02T21:45:48.229840Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`coupons`. Please dump/reload table to fix it!
2021-05-02T21:45:48.430360Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`coupon_gv_queue`. Please dump/reload table to fix it!
2021-05-02T21:45:48.431295Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`coupon_gv_customer`. Please dump/reload table to fix it!
2021-05-02T21:45:52.669380Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2021-05-02T21:45:52.670876Z 0 [ERROR] [MY-010119] [Server] Aborting

Die Fehler oben laufen als loop fortlaufend in das error.log
Status: "Data Dictionary upgrade from MySQL 5.7 in progress"

[ERROR] [MY-011082] [Server] Table upgrade required for <database.table>. Please dump/reload table to fix it!
[ERROR] [MY-010022] [Server] Failed to Populate DD tables.
[ERROR] [MY-010119] [Server] Aborting

Es geht hier also nicht weiter.

Ich denke, der akonadi mysql-server, separat von dem systemweiten, kann nicht starten, solange das nicht abgeschlossen ist. Es kann aber auch an appamor liegen.

apparmor beklagt sich ein cache file nicht erstellen zu können.
Mai 02 22:06:22 ubuntu apparmor.systemd[20438]: Warnung aus /etc/apparmor.d (/etc/apparmor.d/usr.sbin.mysqld Zeile 85): Warning failed to create cache: usr.sbin.mysqld

floogy

(Themenstarter)

Anmeldungsdatum:
21. Juli 2006

Beiträge: 3294

Wohnort: Koblenz

Ich denke, ich muss mysql downgraden auf 57 und dann nochmal einen dump machen und die Tabelle zencart1 sichern (dump), löschen > upgrade auf mysql80, zurück laden (reload).

Please dump/reload table to fix it!
https://dev.mysql.com/doc/refman/5.7/en/rebuilding-tables.html#rebuilding-tables-dump-reload

Voranggangener Versuch nach https://stackoverflow.com/questions/42153059/mysqld-safe-directory-var-run-mysqld-for-unix-socket-file-dont-exists, mit ~$ sudo mysqld_safe --skip-grant-tables und der Erstellung von mysql:mysql /var/run/mysqld.

floogy@ubuntu:~$ sudo apt update && sudo apt dist-upgrade           
[sudo] Passwort für floogy: 
Holen:1 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
OK:2 http://de.archive.ubuntu.com/ubuntu focal-backports InRelease                                                 
OK:3 http://de.archive.ubuntu.com/ubuntu focal InRelease                                                           
OK:4 http://archive.ubuntu.com/ubuntu focal InRelease      
Holen:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Es wurden 223 kB in 1 s geholt (201 kB/s).
usage: debtags [-h] [--version] [--verbose] [--debug] {tag,cat,grep,check,diff,mkpatch,search,dumpavail,show,submit,tagcat,tagshow,tagsearch,update,vocfilter} ...
debtags: error: unrecognized arguments: --local
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Aktualisierung für 1 Paket verfügbar. Führen Sie »apt list --upgradable« aus, um es anzuzeigen.
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Paketaktualisierung (Upgrade) wird berechnet... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  amarok-common canorus-data castxml clamtk fonts-essays1743 fonts-hack-ttf fonts-wine formencode-i18n gcc-8-base:i386 gcj-4.6-base gir1.2-accounts-1.0 gir1.2-gdata-0.0
  gir1.2-gnomekeyring-1.0 gir1.2-signon-1.0 glib-networking:i386 gstreamer1.0-plugins-base:i386 gstreamer1.0-plugins-good:i386 gstreamer1.0-x:i386 htmldoc htmldoc-common
  i965-va-driver:i386 icoutils intel-media-va-driver:i386 kde-telepathy-filetransfer-handler kdelibs5-data kdemultimedia-kio-plugins libaa1:i386 libaom0:i386 libasn1-8-heimdal:i386
  libatk-bridge2.0-0:i386 libatk1.0-0:i386 libatspi2.0-0:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libavc1394-0:i386 libavcodec58:i386 libavdevice57
  libavfilter6 libavutil56:i386 libboost-atomic1.65.1 libboost-chrono1.65.1 libboost-date-time1.65.1 libboost-filesystem1.65.1 libboost-graph1.65.1 libboost-iostreams1.65.1
  libboost-locale1.65.1 libboost-regex1.65.1 libboost-serialization1.65.1 libboost-signals1.65.1 libboost-test1.65.1 libboost-thread1.65.1 libbrotli1:i386 libcaca0:i386
  libcairo-gobject2:i386 libcairo2:i386 libcamel-1.2-61 libcap2:i386 libcapi20-3:i386 libcdio17 libcdparanoia0:i386 libcfitsio5 libchromaprint-tools libcloudproviders0
  libcodec2-0.9:i386 libcolord2:i386 libcups2:i386 libcurl3-gnutls:i386 libdatrie1:i386 libdlrestrictions1 libdouble-conversion1 libdouble-conversion3:i386 libdrm-amdgpu1:i386
  libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libdv4:i386 libecal-1.2-19 libedataserver-1.2-23 libegl-mesa0:i386 libegl1:i386 libelf1:i386 libepoxy0:i386
  libevdev2:i386 libevent-2.1-6 libevent-core-2.1-6 libexif12:i386 libfaudio0:i386 libflowcanvas5v5 libfreerdp-cache1.1 libfreerdp-client1.1 libfreerdp-codec1.1 libfreerdp-core1.1
  libfreerdp-crypto1.1 libfreerdp-gdi1.1 libfreerdp-locale1.1 libfreerdp-primitives1.1 libfreerdp-rail1.1 libfribidi0:i386 libgbm1:i386 libgd3:i386 libgdbm-compat4:i386 libgdbm5
  libgdbm6:i386 libgdk-pixbuf2.0-0:i386 libgegl-0.3-0 libgfortran4 libgit2-26 libgl1:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglib2.0-0:i386 libglu1-mesa:i386 libglvnd0:i386
  libglx-mesa0:i386 libglx0:i386 libgmp10:i386 libgnome-desktop-3-17 libgnomecanvasmm-2.6-1v5 libgnutls30:i386 libgomp1:i386 libgpgme++2v5 libgphoto2-6:i386 libgphoto2-port12:i386
  libgps23 libgraphite2-3:i386 libgsm1:i386 libgspell-1-1 libgssapi-krb5-2:i386 libgssapi3-heimdal:i386 libgstreamer-plugins-base1.0-0:i386 libgstreamer-plugins-good1.0-0:i386
  libgstreamer1.0-0:i386 libgtk-3-0:i386 libgudev-1.0-0:i386 libgweather-3-15 libharfbuzz0b:i386 libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386
  libhogweed5:i386 libhttp-parser2.7.1 libhunspell-1.6-0 libhwloc5 libhx509-5-heimdal:i386 libical2 libicu52 libicu66:i386 libiec61883-0:i386 libieee1284-3:i386 libigdgmm11:i386
  libindicator7 libinput10:i386 libiso9660-10 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjs-jquery-colorbox libjson-glib-1.0-0:i386 libk5crypto3:i386
  libkdecorations2private5v5 libkeyutils1:i386 libkf5akonadixml5 libkf5calendarcore5abi1 libkf5contacteditor-data libkf5jsembed-data libkf5jsembed5 libkf5syndication5
  libkf5xmlrpcclient-data libkf5xmlrpcclient5 libkrb5-26-heimdal:i386 libkrb5-3:i386 libkrb5support0:i386 libktpotr9 liblcms2-2:i386 libldap-2.4-2:i386 liblivemedia62 libllvm10:i386
  libllvm9 libltdl7:i386 liblvm2app2.2 libmicrodns0 libmp3lame0:i386 libmpg123-0:i386 libmtdev1:i386 libmysofa0 libmysqlclient21:i386 libncurses5:i386 libnettle6 libnettle7:i386
  libnextcloudsync0 libnfs11 libnghttp2-14:i386 libnss-myhostname libnuma1:i386 libodbc1:i386 libokular5core8 libopenal1:i386 libopenjp2-7:i386 libopenmpi2 libopus0:i386
  liborc-0.4-0:i386 liborcus-0.13-0 libpango-1.0-0:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpangox-1.0-0 libparted0debian1 libpcap0.8:i386 libpci3:i386
  libpciaccess0:i386 libpcre2-16-0:i386 libperl5.26 libperl5.30:i386 libpixman-1-0:i386 libplacebo4 libpoppler58 libpoppler73 libproj12 libprotobuf-lite10 libprotobuf10
  libproxy1v5:i386 libpsl5:i386 libpython-dbg libpython2.7-dbg libpython3-dev libpython3.6 libpython3.6-minimal libpython3.6-stdlib libpython3.8-dev libqgsttools-p1 libqpdf21
  libqt5core5a:i386 libqt5dbus5:i386 libqt5gui5:i386 libqt5keychain1 libqt5multimediaquick-p5 libqt5network5:i386 libqt5svg5:i386 libqt5widgets5:i386 libqt5x11extras5:i386
  libqt5xml5:i386 libraw1394-11:i386 libraw16 libre2-4 libreoffice-avmedia-backend-gstreamer libreoffice-kde4 libreoffice-style-galaxy librest-0.7-0:i386 libroken18-heimdal:i386
  librsvg2-2:i386 librsvg2-common:i386 librtmp1:i386 libruby2.5 libsane:i386 libsane1 libsane1:i386 libsasl2-2:i386 libsasl2-modules:i386 libsasl2-modules-db:i386 libsdl2-2.0-0:i386
  libsensors5:i386 libshine3:i386 libshout3:i386 libslang2:i386 libsnappy1v5:i386 libsndio7.0:i386 libsnmp35:i386 libsoup-gnome2.4-1:i386 libsoup2.4-1:i386 libsoxr0:i386
  libspeex1:i386 libsqlite3-0:i386 libssh-4:i386 libssl1.1:i386 libstb0:i386 libstk-4.5.0 libswresample3:i386 libtag1v5:i386 libtag1v5-vanilla:i386 libtext-csv-perl libthai0:i386
  libtheora0:i386 libtiff5:i386 libtorrent-rasterbar9 libtwolame0:i386 libunity-gtk3-parser0 libusb-1.0-0:i386 libv4l-0:i386 libv4lconvert0:i386 libva-drm2:i386 libva-x11-2:i386
  libva2:i386 libvamp-sdk2v5 libvdpau1:i386 libvisual-0.4-0:i386 libvkd3d1:i386 libvpx6:i386 libvulkan1:i386 libwacom2:i386 libwavpack1:i386 libwayland-client0:i386
  libwayland-cursor0:i386 libwayland-egl1:i386 libwayland-egl1-mesa libwayland-server0:i386 libwebkit2gtk-4.0-37-gtk2 libwebp6:i386 libwebpmux3:i386 libwind0-heimdal:i386 libwine:i386
  libwinpr-dsparse0.1 libwinpr-input0.1 libwinpr-pool0.1 libwinpr-registry0.1 libwinpr-rpc0.1 libwinpr-sspi0.1 libwxgtk-media2.8-dbg libx11-xcb1:i386 libx264-155:i386 libx265-179:i386
  libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-icccm4:i386 libxcb-image0:i386 libxcb-keysyms1:i386 libxcb-present0:i386 libxcb-randr0:i386 libxcb-render-util0:i386
  libxcb-render0:i386 libxcb-shape0:i386 libxcb-shm0:i386 libxcb-sync1:i386 libxcb-util1:i386 libxcb-xfixes0:i386 libxcb-xinerama0:i386 libxcb-xinput0:i386 libxcb-xkb1:i386
  libxcomposite1:i386 libxcursor1:i386 libxfreerdp-client1.1 libxi6:i386 libxkbcommon-x11-0:i386 libxkbcommon0:i386 libxml2:i386 libxmmsclient++4v5 libxpm4:i386 libxshmfence1:i386
  libxslt1.1:i386 libxss1:i386 libxv1:i386 libxvidcore4:i386 libxxf86vm1:i386 libzeitgeist-1.0-1 libzvbi0:i386 lmms-common lmms-vst-server:i386 marble-data mesa-va-drivers:i386
  mesa-vdpau-drivers:i386 mesa-vulkan-drivers:i386 nepomuk-core-data ocl-icd-libopencl1:i386 paperkey printer-driver-gutenprint python-alabaster python-asn1crypto python-avahi
  python-imagesize python-jinja2 python-pastedeploy-tpl python-pip-whl python-talloc python-typing python2.7-dbg python3-alabaster python3-babel python3-feedparser python3-imagesize
  python3-packaging python3-pam python3-sphinx python3.6 python3.6-minimal qml-module-qtquick-controls-styles-breeze qpdf qt5-gtk-platformtheme:i386 qtcore4-l10n
  qtdeclarative5-qtquick2-plugin ruby-did-you-mean ruby2.5 sphinx-common udisks unity-lens-applications unity-lens-photos unity-lens-video unity-scope-calculator
  unity-scope-chromiumbookmarks unity-scope-colourlovers unity-scope-devhelp unity-scope-firefoxbookmarks unity-scope-manpages unity-scope-openclipart unity-scope-texdoc
  unity-scope-tomboy unity-scope-video-remote unity-scope-yelp unity-scope-zotero unity-scopes-runner va-driver-all:i386 vdpau-driver-all:i386 wine wine-stable wine32:i386
  xen-hypervisor-4.9-amd64
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
Die folgenden Pakete sind zurückgehalten worden:
  libavcodec-extra
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
2 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [Y/n] y
mysql-server-8.0 (8.0.23-0ubuntu0.20.04.1) wird eingerichtet ...
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
2021-05-02T22:46:36.404543Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
Warning: found usr.sbin.mysqld in /etc/apparmor.d/force-complain, forcing complain mode
Warnung aus /etc/apparmor.d/usr.sbin.mysqld (/etc/apparmor.d/usr.sbin.mysqld Zeile 85): Warning failed to create cache: usr.sbin.mysqld
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2021-05-03 00:47:04 CEST; 7ms ago
    Process: 48156 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 48184 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 48184 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
dpkg: Fehler beim Bearbeiten des Paketes mysql-server-8.0 (--configure):
 »installiertes mysql-server-8.0-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von mysql-server:
 mysql-server hängt ab von mysql-server-8.0; aber:
  Paket mysql-server-8.0 ist noch nicht konfiguriert.

dpkg: Fehler beim Bearbeiten des Paketes mysql-server (--configure):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Es wurde kein Apport-Bericht verfasst, da die Fehlermeldung darauf hindeutet, dass dies lediglich ein Folgefehler eines vorherigen Problems ist.
                                                                                                                                                Fehler traten auf beim Bearbeiten von:
 mysql-server-8.0
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
floogy@ubuntu:~$ systemctl status mysql.service  
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (start) since Mon 2021-05-03 11:35:08 CEST; 47s ago
    Process: 3206712 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 3206720 (mysqld)
     Status: "Data Dictionary upgrade from MySQL 5.7 in progress"
      Error: 2 (Datei oder Verzeichnis nicht gefunden)
      Tasks: 17 (limit: 28438)
     Memory: 504.2M
     CGroup: /system.slice/mysql.service
             └─3206720 /usr/sbin/mysqld

Mai 03 11:35:08 ubuntu systemd[1]: Starting MySQL Community Server...
Mai 03 11:35:58 ubuntu systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Mai 03 11:35:58 ubuntu systemd[1]: mysql.service: Failed with result 'exit-code'.
Mai 03 11:35:58 ubuntu systemd[1]: Failed to start MySQL Community Server.
Mai 03 11:35:58 ubuntu systemd[1]: mysql.service: Scheduled restart job, restart counter is at 837.
Mai 03 11:35:58 ubuntu systemd[1]: Stopped MySQL Community Server.
Mai 03 11:35:58 ubuntu systemd[1]: Starting MySQL Community Server...
floogy@ubuntu:~$ sudo systemctl stop mysql.service
[sudo] Passwort für floogy: 
floogy@ubuntu:~$ systemctl status mysql.service
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2021-05-03 11:36:50 CEST; 16s ago
    Process: 3206786 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 3206794 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 3206794 (code=exited, status=1/FAILURE)
     Status: "Data Dictionary upgrade from MySQL 5.7 in progress"
      Error: 2 (Datei oder Verzeichnis nicht gefunden)

Mai 03 11:35:58 ubuntu systemd[1]: Starting MySQL Community Server...
Mai 03 11:36:50 ubuntu systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Mai 03 11:36:50 ubuntu systemd[1]: mysql.service: Failed with result 'exit-code'.
Mai 03 11:36:50 ubuntu systemd[1]: Stopped MySQL Community Server.
floogy@ubuntu:~$ ps axu | grep mys
floogy  3206912  0.0  0.0  20376   700 pts/0    S+   11:37   0:00 grep mys
floogy@ubuntu:~$ ps axu | grep mysql
floogy  3206915  0.0  0.0  20376   708 pts/0    S+   11:37   0:00 grep mysql
floogy@ubuntu:~$ mysqld_safe --skip-grant-tables
2021-05-03T09:37:48.973180Z mysqld_safe Logging to syslog.
2021-05-03T09:37:48.983995Z mysqld_safe Logging to '/var/log/mysql/error.log'.
/usr/bin/mysqld_safe: Zeile 152: /var/log/mysql/error.log: Keine Berechtigung
2021-05-03T09:37:48.992692Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.
/usr/bin/mysqld_safe: Zeile 152: /var/log/mysql/error.log: Keine Berechtigung
floogy@ubuntu:~$ sudo mysqld_safe --skip-grant-tables
2021-05-03T09:37:57.206027Z mysqld_safe Logging to syslog.
2021-05-03T09:37:57.215016Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2021-05-03T09:37:57.221568Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.
floogy@ubuntu:~$ sudo mkdir /var/run/mysqld
floogy@ubuntu:~$ sudo chown mysql:mysql /var/run/mysqld
floogy@ubuntu:~$ sudo ls -ld /var/run/mysqld
drwxr-xr-x 2 mysql mysql 40 Mai  3 11:38 /var/run/mysqld
floogy@ubuntu:~$ sudo mysqld_safe --skip-grant-tables
2021-05-03T09:39:01.376366Z mysqld_safe Logging to syslog.
2021-05-03T09:39:01.385961Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2021-05-03T09:39:01.462785Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2021-05-03T09:39:43.223659Z mysqld_safe mysqld from pid file /var/lib/mysql/ubuntu.pid ended
floogy@ubuntu:~$ ps axu | grep mysql
floogy  3207730  0.0  0.0  20376   704 pts/0    S+   11:39   0:00 grep mysql
floogy@ubuntu:~$ tail -f /var/log/mysql/error.log
2021-05-03T09:39:26.393117Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`orders`. Please dump/reload table to fix it!
2021-05-03T09:39:26.641954Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`group_pricing`. Please dump/reload table to fix it!
2021-05-03T09:39:26.825626Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`customers_wishlist`. Please dump/reload table to fix it!
2021-05-03T09:39:26.867593Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`customers_basket`. Please dump/reload table to fix it!
2021-05-03T09:39:26.942609Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`coupons`. Please dump/reload table to fix it!
2021-05-03T09:39:27.368012Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`coupon_gv_queue`. Please dump/reload table to fix it!
2021-05-03T09:39:27.368939Z 2 [ERROR] [MY-011082] [Server] Table upgrade required for `zencart1`.`coupon_gv_customer`. Please dump/reload table to fix it!
2021-05-03T09:39:30.066946Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
2021-05-03T09:39:30.067889Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-05-03T09:39:43.152494Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.23-0ubuntu0.20.04.1)  (Ubuntu).
q^C
floogy@ubuntu:~$ 

floogy

(Themenstarter)

Anmeldungsdatum:
21. Juli 2006

Beiträge: 3294

Wohnort: Koblenz

Hier mal ein chat, in dem ich versucht habe das Problem zu lösen.

Leider kapiere ich nicht genau, wo das Problem liegt.

Der Server läuft inzwischen, aber nun gibt es da Problem, dass ich das Root-Passwort nicht mehr verwenden kann.

Das Problem mit zencart1 habe ich durch packen mit tar, verschieben des so erstellten Backups undlöschen des zencart1 Datenbankverzeichnisses gelöst. Danach hat mysql8.0 die Datenbanken von 5.7 konvertiert.

error.log

2021-05-03T19:16:16.210511Z 17 [Warning] [MY-010318] [Server] User entry 'root'@'localhost' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
2021-05-03T19:16:16.210559Z 17 [Warning] [MY-010321] [Server] Some of the user accounts with SUPER privileges were disabled because of empty mysql.user.plugin value. If you are upgrading from MySQL 5.6 to MySQL 5.7 it means that substitution for the empty plugin column was not possible. Probably because of pre 4.1 password hash. If your account is disabled you will need to perform the MySQL upgrade procedure. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.

Versuch, das Passwort zu ändern. das geht zwar für root@ubuntu (hostname), aber nicht für root@localhost. Leider läuft mysql auf localhost, nicht aber auf ubuntu(?).

~$ mysql -uroot -p           
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
floogy@ubuntu:~$ man mysql
floogy@ubuntu:~$ mysql -hubuntu -uroot -p
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on 'ubuntu' (111)
floogy@ubuntu:~$ mysql -u debian-sys-maint -p                               
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 8.0.23-0ubuntu0.20.04.1 (Ubuntu)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW GRANTS;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for debian-sys-maint@localhost                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO `debian-sys-maint`@`localhost` WITH GRANT OPTION                                                                                                                                                                                                                    |
| GRANT APPLICATION_PASSWORD_ADMIN,AUDIT_ADMIN,BACKUP_ADMIN,BINLOG_ADMIN,BINLOG_ENCRYPTION_ADMIN,CLONE_ADMIN,CONNECTION_ADMIN,ENCRYPTION_KEY_ADMIN,FLUSH_OPTIMIZER_COSTS,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,GROUP_REPLICATION_ADMIN,INNODB_REDO_LOG_ARCHIVE,INNODB_REDO_LOG_ENABLE,PERSIST_RO_VARIABLES_ADMIN,REPLICATION_APPLIER,REPLICATION_SLAVE_ADMIN,RESOURCE_GROUP_ADMIN,RESOURCE_GROUP_USER,ROLE_ADMIN,SERVICE_CONNECTION_ADMIN,SESSION_VARIABLES_ADMIN,SET_USER_ID,SHOW_ROUTINE,SYSTEM_USER,SYSTEM_VARIABLES_ADMIN,TABLE_ENCRYPTION_ADMIN,XA_RECOVER_ADMIN ON *.* TO `debian-sys-maint`@`localhost` WITH GRANT OPTION |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> select USER from mysql. user;
+------------------+
| USER             |
+------------------+
| mythtv           |
| pdns             |
|                  |
| akonadi          |
| bacula           |
| debian-sys-maint |
| ggfontlinge      |
| monty            |
| mysql.infoschema |
| mysql.session    |
| mysql.sys        |
| mythtv           |
| pdns             |
| root             |
|                  |
| root             |
+------------------+
16 rows in set (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.06 sec)

mysql> UPDATE mysql.user SET password=password('NewPass') WHERE user='root' AND host='localhost';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('NewPass') WHERE user='root' AND host='localhost'' at line 1
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'NewPass';
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'NewPass';
ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
mysql> SELECT user, host, plugin FROM mysql.user;
+------------------+-----------+-----------------------+
| user             | host      | plugin                |
+------------------+-----------+-----------------------+
| mythtv           | %         | mysql_native_password |
| pdns             | %         |                       |
|                  | localhost | mysql_native_password |
| akonadi          | localhost | mysql_native_password |
| bacula           | localhost | mysql_native_password |
| debian-sys-maint | localhost | mysql_native_password |
| ggfontlinge      | localhost | mysql_native_password |
| monty            | localhost | mysql_native_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session    | localhost | mysql_native_password |
| mysql.sys        | localhost | mysql_native_password |
| mythtv           | localhost | mysql_native_password |
| pdns             | localhost |                       |
| root             | localhost |                       |
|                  | ubuntu    | mysql_native_password |
| root             | ubuntu    | mysql_native_password |
+------------------+-----------+-----------------------+
16 rows in set (0.00 sec)

mysql> ALTER USER 'root'@'ubuntu' IDENTIFIED WITH caching_sha2_password BY 'NewPass';         
Query OK, 0 rows affected (0.09 sec)

mysql> SELECT PLUGIN_NAME, PLUGIN_STATUS
    ->        FROM INFORMATION_SCHEMA.PLUGINS
    ->        WHERE PLUGIN_NAME LIKE '%socket%';
Empty set (0.00 sec)
mysql> exit
Bye

Der chat auf freenode

* Du sprichst jetzt in #mysql
* Das Thema für #mysql ist: MySQL help channel || 8.0.23 GA, 5.7.33 || Register/identify with NickServ to talk bit.ly/hm_reg || dpaste.com or dbfiddle.uk (NOT pastebin.com) || Guidelines bit.ly/hm_chan || Bot info: bit.ly/hm_bot || We don't * PMA -> #phpmyadmin || Cluster help -> #mysql-ndb || We help you find solutions, not give answers
* Das Thema für #mysql wurde gesetzt durch Vacuity!~Vacuity@pdpc/supporter/active/vovo64 um Wed Mar  3 13:49:23 2021

<floogy> Hi, I did an in-place upgrade from mysql57 to mysql80 by upgrading ubuntu bionic to focal.
<floogy> 1 table didn't upgrade and therefore mysql80 fails to start. Unfortunately I didn't dump the databases beforehand :(
<floogy> What kind of options do I have for successfully  "dump/reload table to fix it!" in this case?
<floogy> [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
<floogy> Can I omit that affected table, to start ysql without it?
<last1> did you see how many bugs exist in 8.0 ?
<last1> I don't think it's a good idea to move to it yet
<floogy> The issue is, taht there is no mysql57 in ubuntu 20.04
<floogy> Also I guess it already upgraded the datastructures, despite that one it fails on.
<floogy> Maybe, there is an ppa, or a way from mysql.com or a solution with downgrading/pinning. But I'm not sure, if mysql57 can start with the altered(?) datadir?
<floogy> Unfortionately THIS time I didn't thought on mysql beforehand, and didn't dump all data bases.
<leftyfb> floogy: maybe run your mysqldb in a container or docker running ubuntu 18.04 with mysql 5.7 till you can resolve the database structure
<floogy> Isn't it possible to omit that particular table/database for start-up?
<floogy> Or running both versions side-by-side?
<floogy> Okay, running and solve it in a container would be a possible route  too, I think. But I never used docker.
<Isotopp> floogy: It appears you restore strategy is flawed and needs reviewing independently from this particular incident.
<Isotopp> floogy: https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_force_recovery
<Isotopp> note the Warning
<floogy> Hm, resetting the root password doesn't work for me https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
<floogy> ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
<floogy> or ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('NewPass')
<floogy> WHERE User = 'root' AND Host = 'localhost'' at line 1
<floogy>  ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPass';
<leftyfb> floogy: https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password-on-ubuntu-20-04
<floogy> mysql> FLUSH PRIVILEGES;
<floogy> ERROR 1227 (42000): Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
<floogy> Do I need Configuring MySQL to Start Without Grant Tables for thi step (3)?
<floogy> I also edited  ExecStart=/usr/sbin/mysqld --skip-grant-tables --skip-networking 
<floogy> But that didn't changed the situation.
<floogy> mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'NewPass';
<floogy> ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation
<floogy> leftyfb, https://paste.ubuntu.com/p/HTbP97qjMz/
<floogy> If I try to user root instead of debian-sys-maint I get this:
<floogy> https://paste.ubuntu.com/p/V3HZNHBXMt/
<thumbs> !t floogy root as root
<ubiquity_bot> floogy: If "mysql -u root" only works as the system root user, you might be using the auth_socket plugin. SELECT user, host, plugin FROM mysql.user; and see https://dev.mysql.com/doc/refman/5.7/en/socket-pluggable-authentication.html
<floogy> Is that the case? https://paste.ubuntu.com/p/DgvKV5sWkT/
<floogy> maybe I should use 'root'@'ubuntu' instead of 'root'@'localhost'?
<floogy> Yes, that's it. ubuntu versus localhost.
<floogy> I guess I have to recreate root and delet the other second root user? ~$ mysql -hubuntu -uroot -p
<floogy> Enter password: 
<floogy> ERROR 2003 (HY000): Can't connect to MySQL server on 'ubuntu' (111) 
<floogy> Okay, I think I got it. I didn't read the error log carefully: https://paste.ubuntu.com/p/TBpMz5Qw2G/
<floogy> thumbs, thanks for the hint. So I have to INSTALL that plugin, right?
<thumbs> no, it means that recent packages use the auth_socket
<thumbs> and that you should not change that user, either
<floogy> thumbs, I tried to upgrade from mysql5.7 to mysql8.0 because I upgraded from ubuntu LTS 18.04 to 20.04. I think, the issue is, that some structure of the databases are not up to date? Some user doesn't use the auth plugin. One is root@localhost. But I'm not sure if I understand that right.
<floogy> the users allmost all use buildin mysql_native_password  and mysql.infoschema  uses caching_sha2_password https://dev.mysql.com/doc/refman/5.7/en/native-pluggable-authentication.html
<floogy> Sorry, I don't get it. See you eventually tomorrow ...

floogy

(Themenstarter)

Anmeldungsdatum:
21. Juli 2006

Beiträge: 3294

Wohnort: Koblenz

<floogy> thumbs, here is the solution to my issue: https://superuser.com/questions/603026/mysql-how-to-fix-access-denied-for-user-rootlocalhost/1129234#1129234
<floogy> update user set plugin='mysql_native_password' where User='root';

Ach so: akonadi geht immer noch nicht. Exact die Fehlermeldung wie im Eingangspost. Wahrscheinlich wegen apparmor, da hagelt es nämlich notifications von apparmor.

~$ org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/floogy/.local/share/akonadi/mysql.conf", "--datadir=/home/floogy/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: ""
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/user/1000/akonadi/mysql.socket' (2)'
Check that mysqld is running and that the socket: '/run/user/1000/akonadi/mysql.socket' exists!
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

Aber:

2021-05-03T20:47:19.807437Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23-0ubuntu0.20.04.1) starting as process 3258106
2021-05-03T20:47:19.848560Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-05-03T20:47:20.967507Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-05-03T20:47:21.095722Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-05-03T20:47:21.301001Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-05-03T20:47:21.301321Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-05-03T20:47:21.313796Z 0 [Warning] [MY-010318] [Server] User entry 'pdns'@'%' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
2021-05-03T20:47:21.314180Z 0 [Warning] [MY-010318] [Server] User entry 'pdns'@'localhost' has an empty plugin value. The user will be ignored and no one can login with this user anymore.
2021-05-03T20:47:21.314422Z 0 [Warning] [MY-010319] [Server] Found invalid password for user: 'root@ubuntu'; Ignoring user
2021-05-03T20:47:21.340053Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.23-0ubuntu0.20.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).

(offenbar stört mysql nun nach der Lösung sich an root@ubuntu ..., anderes Problem)

~$ sudo systemctl status mysql
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-05-03 22:47:21 CEST; 4s ago
    Process: 3258075 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
   Main PID: 3258106 (mysqld)
     Status: "Server is operational"
      Tasks: 38 (limit: 28438)
     Memory: 344.6M
     CGroup: /system.slice/mysql.service
             └─3258106 /usr/sbin/mysqld

Mai 03 22:47:19 ubuntu systemd[1]: Starting MySQL Community Server...
Mai 03 22:47:21 ubuntu systemd[1]: Started MySQL Community Server.

Ich wollte gerade nextcloud installieren. Das ergab dann: Sie haben zurückgehaltene defekte Pakete.

 
~$ sudo apt install nextcloud-desktop
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass
Sie eine unmögliche Situation angefordert haben oder, wenn Sie die
Unstable-Distribution verwenden, dass einige erforderliche Pakete noch
nicht erstellt wurden oder Incoming noch nicht verlassen haben.
Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:

Die folgenden Pakete haben unerfüllte Abhängigkeiten:
 nextcloud-desktop : Hängt ab von: libnextcloudsync0 (= 2.6.2-1build1) aber 2.6.4-20200303.193231~bionic1 soll installiert werden
                     Empfiehlt: nextcloud-desktop-doc soll aber nicht installiert werden
E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.
~$ sudo apt --fix-broken install        
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  amarok-common ...

[...]

Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 7 nicht aktualisiert.
2 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
mysql-server-8.0 (8.0.23-0ubuntu0.20.04.1) wird eingerichtet ...
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 1117200
Warning: found usr.sbin.mysqld in /etc/apparmor.d/force-complain, forcing complain mode
Warnung aus /etc/apparmor.d/usr.sbin.mysqld (/etc/apparmor.d/usr.sbin.mysqld Zeile 85): Warning failed to create cache: usr.sbin.mysqld
mysql-server (8.0.23-0ubuntu0.20.04.1) wird eingerichtet ...

floogy

(Themenstarter)

Anmeldungsdatum:
21. Juli 2006

Beiträge: 3294

Wohnort: Koblenz

Die akonadi Fehlermeldung ist nun leicht anders.

~$ akonadictl start --verbose
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
~$ org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Found mysql_install_db:  ""
org.kde.pim.akonadiserver: Found mysqlcheck:  "/usr/bin/mysqlcheck"
org.kde.pim.akonadiserver: Using mysqld: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadicontrol: Service ":1.158" owner changed from "" to ":1.158"
org.kde.pim.akonadicontrol: Service ":1.159" owner changed from "" to ":1.159"
org.kde.pim.akonadiserver: mysqld reports version 8.0.23 (Oracle MySQL)
org.kde.pim.akonadiserver: Executing: "/usr/sbin/mysqld-akonadi" "--defaults-file=/home/gerhard/.local/share/akonadi/mysql.conf --datadir=/home/gerhard/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid"
org.kde.pim.akonadicontrol: Service ":1.160" owner changed from "" to ":1.160"
org.kde.pim.akonadicontrol: Service ":1.160" owner changed from ":1.160" to ""
org.kde.pim.akonadicontrol: Service ":1.161" owner changed from "" to ":1.161"
org.kde.pim.akonadicontrol: Service ":1.161" owner changed from ":1.161" to ""
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/gerhard/.local/share/akonadi/mysql.conf", "--datadir=/home/gerhard/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: "mysqld-akonadi: [ERROR] Failed to open required defaults file: /home/gerhard/.local/share/akonadi/mysql.conf\nmysqld-akonadi: [ERROR] Fatal error in defaults handling. Program aborted!\n"
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
org.kde.pim.akonadiserver: terminating connection threads
org.kde.pim.akonadiserver: terminating service threads
org.kde.pim.akonadiserver: stopping db process
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/user/1000/akonadi/mysql.socket' (2)'
Check that mysqld is running and that the socket: '/run/user/1000/akonadi/mysql.socket' exists!
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Service ":1.159" owner changed from ":1.159" to ""
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

floogy

(Themenstarter)

Anmeldungsdatum:
21. Juli 2006

Beiträge: 3294

Wohnort: Koblenz

Es scheint definitiv so zu sein, dass akonadi, also KDE-PIM-Programme wie KMail, kontact etc. inzwischen auf mariadb angewiesen ist und zuletzt nur noch mit mysql-5.7.33 lief. Mysql-8.0 wird nicht mehr unterstützt, was aber für mich auch nicht klar ersichtlich war. Zumindest funktionierte eine parallele Installation von mysql-8.0 und akonadi, kmail, kontact etc. hier ohne dass das Paketsystem damit Probleme gehabt hätte. Ich hoffe, das KDE-Team arbeitet daran, bald auch wieder >= mysql-8 zu unterstützen, denn nach dem upgrade auf mysql-8 lässt sich nun die Datenbank nicht mehr von mariadb einlesen, da sich mariadb an ein Datenverzeichnis mit unbekannter Struktur stößt und es für korrupt hält. Zum Glück hatte ich nun, nach meinem Lapsus beim upgrade von 18.04 auf 20.04 ein mysqldump erstellt. Ich hoffe somit alle Daten wieder herstellen zu können.

Nach der Installation von mariadb, und damit nach der Entfernung von mysql-8.0, startete akonadi ganz normal und KMail zeigt mir alle E-Mails an und funktioniert wieder.

Zuvor hatte ich auch schon mysql-8 zum Laufen gebracht, allerdings hat das upgrade der Datenstruktur dazu geführt, dass nun mariadb mit den Datenbanken nicht mehr klar kommt und systemweit erst mal nicht startet, und sich nur durch akonadictl starten lässt, da es sich dann auf die vormals im mysql-5.7 vorliegende PIM-Datenbank Akonadis beschränkt und sich nicht an /var/lib/mysql die Zähne ausbeissen will.

Eventuell reiche ich noch ein paar Details nach.

https://forum.ubuntuusers.de/topic/nach-upgrade-von-bionic-akonadi-schlaegt-mit-u/

Antworten |