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