Bug 335209 - sqlite backend not selected automatically
Summary: sqlite backend not selected automatically
Status: RESOLVED NOT A BUG
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: 1.12.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-22 17:42 UTC by Ralf Jung
Modified: 2014-05-28 17:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Jung 2014-05-22 17:42:25 UTC
I decided to use the sqlite backend instead of the mysql backend to save system resources and startup time - I am not going to put much data into Akonadi anyway, so I don't want a full-blown mysql to run all the time.

Reproducible: Always

Steps to Reproduce:
1. Make sure sqlite is the only available backend
2. Make sure no akonadi process is running
3. delete ~/.config/akonadi and ~/.local/share/akonadi
4. Start akonadi
Actual Results:  
 It tries to start the mysql backend, which fails (as expected).
"akonadictl start" prints this error over and over (and a backtrace):

Found mysql_install_db:  "" 
Found mysqlcheck:  "/usr/bin/mysqlcheck" 
Did not find MySQL server default configuration (mysql-global.conf)

Expected Results:  
It should select the right backend (sqlite) automatically if it's the only installed backend.

After manually setting "Driver=QSQLITE3" in ~/.config/akonadi/akonadiserverrc, things work as expected.

I am running Debian testing amd64.
Comment 1 Daniel Vrátil 2014-05-28 09:17:44 UTC
When there's no configuration, Akonadi falls back to a default backend. The default backend can be defined during compilation, but when none is defined, it will choose MySQL. Most distributions don't change this (I only know about Fedora shipping Akonadi compiled with SQLite as default backend), so most users get MySQL automagically when they start Akonadi for the first time.

Falling back to another database backend is not a desired behavior. In case existing MySQL database fails to start for some reason and Akonadi would just fallback to SQLite and create a new SQLite database, which would just mess up KMail and other apps.


You can manually configure the backend in Akonadi Server Configuration KCM (kcmshell4 akonadi) and start Akonadi from there. You should not need to modify the config files by hand.
Comment 2 Ralf Jung 2014-05-28 17:40:05 UTC
(In reply to comment #1)
> You can manually configure the backend in Akonadi Server Configuration KCM
> (kcmshell4 akonadi) and start Akonadi from there. You should not need to
> modify the config files by hand.

That's good to know, thanks.