Akonadi refuses to start.
I tried removing the ~/.local/share/akonadi
folder and running it fresh, and I also tried starting Akonadi from a new user.
As you can see it is not complaining about mysql-files directory however I had it.
I purged akonadi/*
and reinstalled.
apparmor stop and disabled therefore is not apparmor issue
mysql Ver 8.0.20-0ubuntu0.20.04.1 for Linux on x86_64 (Ubuntu)
$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadicontrol: Service ":1.181" owner changed from "" to ":1.181"
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"
org.kde.pim.akonadiserver: mysqld reports version 8.0.20 (Oracle MySQL)
org.kde.pim.akonadiserver: Executing: "/usr/sbin/mysqld" "--defaults-file=/home/brad/.local/share/akonadi/mysql.conf --datadir=/home/brad/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid"
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"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/brad/.local/share/akonadi/mysql.conf", "--datadir=/home/brad/.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: "Process operation timed out"
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.181" owner changed from ":1.181" to ""
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
Upon 20.10 upgrade reinstalled mysql-server and the output is this:
$ 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: "/usr/bin/mysql_install_db"
org.kde.pim.akonadiserver: Found mysqlcheck: "/usr/bin/mysqlcheck"
org.kde.pim.akonadiserver: Using mysqld: "/usr/sbin/mysqld"
org.kde.pim.akonadiserver: mysqld reports version 10.5.12 (MariaDB)
org.kde.pim.akonadiserver: Executing: "/usr/sbin/mysqld" "--defaults-file=/home/brad/.local/share/akonadi/mysql.conf --datadir=/home/brad/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid"
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"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/brad/.local/share/akonadi/mysql.conf", "--datadir=/home/brad/.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: "2021-09-11 15:01:03 0 [Note] /usr/sbin/mysqld (mysqld 10.5.12-MariaDB-0ubuntu0.21.04.1) starting as process 10897 ...\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
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
UPDATE: this issue was solved by reinstalling mysql
brad@zika:~$ akonadictl start -v
akonadictl 5.18.1 (21.08.1)
brad@zika:~$ akonadictl start
org.kde.pim.akonadictl: Starting Akonadi Server...
org.kde.pim.akonadictl: done.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
brad@zika:~$ org.kde.pim.akonadiserver: Starting up the Akonadi Server...
akonadi.collectionattributetable OK
akonadi.collectionmimetyperelation OK
akonadi.collectionpimitemrelation OK
akonadi.collectiontable OK
akonadi.flagtable OK
akonadi.mimetypetable OK
akonadi.parttable OK
akonadi.parttypetable OK
akonadi.pimitemflagrelation OK
akonadi.pimitemtable OK
akonadi.pimitemtagrelation OK
akonadi.relationtable OK
akonadi.relationtypetable OK
akonadi.resourcetable OK
akonadi.schemaversiontable OK
akonadi.tagattributetable OK
akonadi.tagremoteidresourcerelationtable OK
akonadi.tagtable OK
akonadi.tagtypetable OK
org.kde.pim.akonadiserver: Running DB initializer
org.kde.pim.akonadiserver: DB initializer done
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadicontrol: Akonadi server is now operational.
brad@zika:~$ akonadictl status
Akonadi Control: running
Akonadi Server: running
Akonadi Server Search Support: available (Remote Search)
Available Agent Types: No agent types found!
brad@zika:~$ akonadictl stop
brad@zika:~$ org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
brad@zika:~$
When we have issues with the default mysql that comes with KDE, we can have our own MySQL server and ask KDE to store its data there.
Details are here https://gist.github.com/aldolat/e8066baf8a390e5d5f5ed6e0849ec78c