Stop Akonadi and related applications quit KMail/Kontact/KOrganizer, and issue this command:
akonadictl stop
Make sure no Akonadi or MySQL process is running:
ps -ux | grep mysql
ps -ux | grep akonadi
They should not show anything else but the grep process itself.
Remove old Akonadi database and config
Delete the following folders
~/.local/share/akonadi
~/.config/akonadi
Delete also the files starting with akonadi from
~/.kde4/share/config
Restart Akonadi server
akonadictl start
Done, now add back the accounts