Database maintenance

Martin Steigerwald <[email protected]>
Newsgroups gmane.comp.kde.users.pim
Message-ID <1829899.ZHRAr8tVoJ@merkaba>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.