Archive for July 21st, 2011
The reasons why Akonadi starts its own database instance are sometimes unclear to users.
In a perfect world, Akonadi, Amarok, Digikam… would use the same database but well… stop dreaming, the reality is different, there are valid reasons.
Currently Akonadi can start and work with both MySQL (and variants) or Postgresql. It even supports using an external server.
You may wonder why we prefer starting a dedicated instance of your favorite server. There are two main reasons for that:
- Users should not have to be root to set up Akonadi. Using an external server means you have to create a user, grant him some privileges and create a database before starting Akonadi; In fact, users should not have to bother about what Akonadi is.
- Akonadi needs some special settings to work correctly. For obvious reasons, the Akonadi server cannot change your central MySQL settings.
How to configure your external server ?
The answer for MySQL is easy: use the same settings as the internal server.
For desktop users: mysql-global.conf
For mobile users: mysql-global-mobile.conf
The wait_timeout tweak is *very* important. The default value is 8 hours and once reached, you end up with this error: MySQL server has gone away QMYSQL: Unable to execute query which leads to all kind of issues (eg. 219710#3, 226400#c8)
Using an external Postresql server is also possible but you must have standard_conforming_strings = on in your postgres.conf. If off, Akonadi will not be able to fill its tables and you end up with issues such as bug 267807.
The Postgres doc claims «the default will change to on in a future release for improved standards compliance» since 8.2. Nothing happened yet…