[Akonadi] [Bug 334014] akonadiserver start problem after 4.12 to 4.13 update

Daniel Vrátil dvratil at redhat.com
Tue Apr 29 10:04:03 BST 2014


https://bugs.kde.org/show_bug.cgi?id=334014

Daniel Vrátil <dvratil at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |dvratil at redhat.com
         Resolution|---                         |INVALID

--- Comment #1 from Daniel Vrátil <dvratil at redhat.com> ---
Your problem is that you are missing some constraints in the database, which
caused the database to contain invalid data. Akonadi depends on those
constraints to keep all data valid. Not sure how you came to not having them,
but we need to first clean up the invalid data manually before Akonadi can
create those foreign key constraints.

1) Start the MySQL database manually (on your distribution mysqld might be
located elsewhere):
/usr/libexec/mysqld --defaults-file=$HOME/.local/share/akonadi/mysql.conf
--datadir=$HOME/.local/share/akonadi/db_data/ --socket=/tmp/akonadimysql.socket

2) Connect to it (from another terminal):
mysql --socket=/tmp/akonadimysql.socket

3) Check whether you are using the correct database engine:
SELECT TABLE_NAME,ENGINE FROM information_schema.TABLES WHERE
TABLE_SCHEMA='akonadi';

This should return ~15 records, in format "table name | engine " where "engine"
should always be "InnoDB". If "engine" is "MyISAM", run the query in step 4)
for each such table, otherwise skip to step 5).

4) Convert table to InnoDB (replace "tableName" in the query with actual table
name):
ALTER TABLE akonadi.tableName ENGINE = InnoDB;

5) Select the database
USE akonadi;

6) Remove invalid data
DELETE FROM CollectionTable WHERE parentId NOT IN (SELECT id FROM
CollectionTable) AND parentId IS NOT NULL;

This should print something like "X Rows affected",  check whether X > 0.

7) Stop the MySQL server
mysqladmin --socket=/tmp/akonadimysql.socket shutdown

(or just send SIGTERM the mysqld)

8) Start Akonadi
akonadictl start

Akonadi will now be able to create the foreign key constraint. If you were
missing the key constraints in more places, it's possible that there will be
more invalid data in other tables that need to be cleaned up in similar way, so
the startup might fail again. In such case please paste the full output again
and we will continue :-)

I'll close this as invalid, since it's not really a bug in Akonadi, but feel
free to paste the Akonadi output here if there's a problem again.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list