After upgrading to 4.10 akonadi fails to start. The error from log file: Sql error: Table 'akonadi.collectiontable' doesn't exist QMYSQL: Unable to execute query Query: ALTER TABLE CollectionTable ADD COLUMN id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY" Unable to initialize database. Reproducible: Always
Not fixed in 4.10.1
please attach the output of 'akonadictl start' and 'akonadictl --version'
Created attachment 77938 [details] akonadictl start karol@ubuntu:~$ akonadictl --version Akonadi 1.9.0
Still not fixed in 4.10.2
Which mysql did you use, internal or external? Did you set case sensitivity manually? Have a look at bug 220007. And can you check the mysql table manually, if the table not exist or has different case?
(In reply to comment #5) > Which mysql did you use, internal or external? Internal. > Did you set case sensitivity manually? Have a look at bug 220007. No, i did not. Also, the bug was fixed in 2009. > And can you check the mysql table manually, if the table not exist or has > different case? How can I do that?
Run akonadiconsole, in tab "DB console" bottom edit box, Enter "show tables". Check if collectiontable table exist. It seems your database is corrupted. Could you check if it works if you create a new KDE user? If it works. You can in DB console, run "show create table collectiontable;" command. It will generate a database creation command. Run the command to create the table. My table here is as below. But My akondi version is 1.9.2. So it maybe different with yours. "CREATE TABLE `collectiontable` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `remoteId` varbinary(255) DEFAULT NULL, `remoteRevision` varbinary(255) DEFAULT NULL, `name` varbinary(255) NOT NULL, `parentId` bigint(20) DEFAULT NULL, `resourceId` bigint(20) NOT NULL, `subscribed` tinyint(1) NOT NULL DEFAULT '1', `cachePolicyInherit` tinyint(1) NOT NULL DEFAULT '1', `cachePolicyCheckInterval` int(11) NOT NULL DEFAULT '-1', `cachePolicyCacheTimeout` int(11) NOT NULL DEFAULT '-1', `cachePolicySyncOnDemand` tinyint(1) NOT NULL DEFAULT '0', `cachePolicyLocalParts` varbinary(255) DEFAULT NULL, `queryString` varbinary(32768) DEFAULT NULL, `queryLanguage` varbinary(255) DEFAULT NULL, `isVirtual` tinyint(1) DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `CollectionTable_parentAndNameIndex` (`parentId`,`name`), KEY `resourceId` (`resourceId`), CONSTRAINT `collectiontable_ibfk_1` FOREIGN KEY (`parentId`) REFERENCES `collectiontable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `collectiontable_ibfk_2` FOREIGN KEY (`resourceId`) REFERENCES `resourcetable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8
(In reply to comment #7) > Run akonadiconsole, "Failed to connect to database: Can't connect to local MySQL server through socket '/home/kjedrzejczyk/.local/share/akonadi/socket-ubuntu/mysql.socket' (2) QMYSQL: Unable to connect" The socket file I have is akonadiserver.socket.
Did you check the result of a newly created user?
(In reply to comment #9) > Did you check the result of a newly created user? Yes, it works, however I cannot recreate the table obviously.
Still not fixed in 4.11
Could you check if https://wiki.archlinux.org/index.php/KDE#Clean_akonadi_configuration_to_fix_kmail fix your problem. Your local database is corrupted during upgrading. Yes, it is indeed a bug. But if clean old configuration fix your problem, at least you could use it again.
The CollectionTable has been indeed updated in 1.9.0, the updater should have taken care of it on first start, but it had probably failed, corrupting the table (for a reason we will never find out). Please follow the in the wiki link in comment #12 to reset your Akonadi database. If you run into the corruption again, please reopen this bug.