SUMMARY After upgrade to KDE Applications 19.04.3 Kontact can not start the Akonadi Server any more. STEPS TO REPRODUCE 1. Start Kontact, Kmail, Akonadi, ... 2. Observe the error message that Akonadi can't be started OBSERVED RESULT Starting via "akonadictl start" creates the following output: 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/till/.local/share/akonadi/mysql.conf", "--datadir=/home/till/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/default/mysql.socket", "--pid-file=/run/user/1000/akonadi/default/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/default/mysql.socket' (2)' Check that mysqld is running and that the socket: '/run/user/1000/akonadi/default/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... Apparently the socket '/run/user/1000/akonadi/default/mysql.socket' doesn't exist. EXPECTED RESULT -- SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: KDE Neon (available in About System) KDE Plasma Version: 5.16.3 KDE Frameworks Version: 5.59.0 Qt Version: 5.12.3 ADDITIONAL INFORMATION
Same here, on two similarly configured machines all PIM applications were rendered unusable. Stopgap solution that worked for me: install akonadi-backend-sqlite and then remove akonadi-backend-mysql.
Perhaps I should have added that I tried to fixes permissions for /var/lib/mysql (if you run /usr/bin/akonadiserver you'll get an error about that), to remove ~/.local/share/akonadi, but nothing helped or led to more info (to me).
Same problem here. I've tried deleting akonadi's configs and folders.... and making a clean install of my packages...but still refusing to connect.
I solved the problem. It'a an AppArmor issue. You need to edit your AppArmor configuration. vim /etc/apparmor.d/usr.sbin.mysqld-akonadi The content looks like this from the beginning. I only added a lot's of stuff at the top. ``` # vim:syntax=apparmor #include <tunables/global> /usr/sbin/mysqld-akonadi { #include <abstractions/base> /usr/sbin/mysqld-akonadi r, /usr/sbin/mysqld cx, profile /usr/sbin/mysqld { /run/user/1000/akonadi/default/mysql.pid rwmk, /run/user/1000/akonadi/default/mysql.socket rwmk, /run/user/1000/akonadi/default/mysql.socket.lock rwmk, /sys/devices/system/node/* r, /sys/devices/system/node/ r, /etc/mysql/* r, /etc/mysql/mysql.conf.d/ r, /etc/mysql/mysql.conf.d/* r, /sys/devices/system/node/node0/meminfo r, [more lines] ``` Afterwards reload the apparmor configuration for the file. apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld-akonadi You can restart Akonadi via the Akonadi console or a system restart now. At least it worked for me and I'm fine again. :-)
I think updates were just released that fix it.
As stated in comment#4, this is an apparmor issue.
(In reply to Stefan Galinski from comment #4) > I solved the problem. It'a an AppArmor issue. > > You need to edit your AppArmor configuration. > > vim /etc/apparmor.d/usr.sbin.mysqld-akonadi > > The content looks like this from the beginning. I only added a lot's of > stuff at the top. > > ``` > # vim:syntax=apparmor > > #include <tunables/global> > > /usr/sbin/mysqld-akonadi { > #include <abstractions/base> > /usr/sbin/mysqld-akonadi r, > /usr/sbin/mysqld cx, > > profile /usr/sbin/mysqld { > /run/user/1000/akonadi/default/mysql.pid rwmk, > /run/user/1000/akonadi/default/mysql.socket rwmk, > /run/user/1000/akonadi/default/mysql.socket.lock rwmk, > /sys/devices/system/node/* r, > /sys/devices/system/node/ r, > /etc/mysql/* r, > /etc/mysql/mysql.conf.d/ r, > /etc/mysql/mysql.conf.d/* r, > /sys/devices/system/node/node0/meminfo r, > [more lines] > ``` > > Afterwards reload the apparmor configuration for the file. > > apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld-akonadi > > You can restart Akonadi via the Akonadi console or a system restart now. > > At least it worked for me and I'm fine again. :-) I don't have any "usr.sbin.mysqld-akonadi" in my KDE Neon.
Finally i've created (i think) usr.sbin.mysqld-akonadi file with: sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld-akonadi and fix the trouble as is suggested. Thank you!