Database maintenance

Martin Steigerwald martin at lichtvoll.de
Wed Aug 16 08:33:28 BST 2017


Hello.

Today I found again some errors in mysql.err, that some innodb stats table 
does not exist. There are wild help blog posts available to create those 
manually by pasting page long mysql create statements into your mysql client. 
Don´t.

In my case the errors didn´t prevent startup of Akonadi, but I still wanted to 
clean MySQL log file again. In my company accoun even the complete mysql 
database was missing… I don´t want to know anything about why that is the 
case. It might be that I messed it up at some time… even with a time machine I 
wouldn´t know to what time to go back to exactly check what happened there.

Anyway, in case you have messages like missing tables in mysql or information 
database and things like that, or even on any major MySQL or in my case 
MariaDB update, you can just run:

mysql_upgrade --socket ~/.local/share/akonadi/socket-merkaba/mysql.socket

while MySQL is running. Says: While Akonadi is running.

Of course to complete the maintenance you can also run:

akonadictl fsck

and

akonadictl vacuum

(later only if you have enough free space)


In my point of view Akonadi should handle at least the mysql_upgrade thing 
automatically (or not use a RDMS). It shall not require the user to be a 
database admin.

Of course it can also help to document the above in user wiki. Feel free to 
copy&paste if you go about it.

Thanks,
-- 
Martin



More information about the kdepim-users mailing list