KDE 4.2 brings the MySQL server to the desktop

If you’re using Fedora 10, and are a KDE desktop user, you’ll notice that your latest KDE 4.2 update, requires having a local MySQL server installed. This is due to Akonadi, part of the KDE PIM packages, that now rely on MySQL as a default server, for storing PIM data. Just a few months ago, I mentioned the news that Amarok 2 will also use MySQL as a default database.

Akonadi uses MySQL mainly as a cache, not as a data store. This is something that Debian users will also see. Eventually, anyone with KDE 4.2 will see the requirement to have a MySQL server installed. If you already have a native installation of MySQL provided for by your distribution (maintained by RPM/DPKG), it naturally won’t be installing another copy – it just uses the system-wide version.

Not everyone is happy. Especially those that use netbooks, with limited disk space. Reading Reducing the MySQL 5.1.30 disk footprint by Ronald Bradford might help in that respect – there are ways to reduce up to 25% of the space.

However, from a MySQL perspective, and as a member of the Sun Database Group, I am happy to see the ubiquity of MySQL, on the Linux desktop.

For the technical folk amongst you, its worth looking at the akonadi spec file:

BuildRequires: mysql-devel
BuildRequires: mysql-server
# when/if akonadi grows support for other backends, consider splitting
# these similar to how phonon is done currently.
Requires: qt4-mysql
# not *strictly* required, but we need a functional default configuration
Requires(hint): mysql-server
Requires an available instance of mysql server at runtime.  
Akonadi can spawn a per-user one automatically if the mysql-server 
package is installed on the machine.
See also: %{_sysconfdir}/akonadi/mysql-global.conf


  1. or, depending on features used – Drizzle could be the answer.

  2. Arjen Lentz says:

    I think it’s a hideously bad idea for most of these uses to take MySQL.
    SQLite would generally do the trick quite nicely.

  3. byte says:

    @stewart: Yeah, drizzle when it becomes more mature, I’m sure might be good – its kernel based approach would be right

    @arjen: Amarok for example, did come from using an entirely SQLite backend. There were however deficiencies, like performance with very large databases (lots of music – same story now – lots of PIM information), the fact that if you had many computers that shared one database, SQLite wouldn’t fly.

    Could it be schema related? I don’t know.

    But I was also surprised to see https://answers.launchpad.net/drizzle/+question/60680 in where the poster wants Drizzle on an iPhone, because there are concurrency issues with SQLite.

    Apple, while they encourage the use of SQLite for CoreData, don’t use it themselves for some desktop apps also (there’s a famous one that uses postgresql as the DB of choice).

    I’ve also heard people complain that sqlite doesn’t do fsync() well, and this is apparent with one’s usage of popular browsers like Firefox. I’ve not had the time to investigate, and generally have no problems with my browser, so to speak.

    However, I can’t comment on SQLite much more, as I don’t have vast experience using it.

  4. John Vincent says:

    Well this is unfortunate. Requiring mysql to be installed AND running from the get go? Why not provide an option, in the same way that Amarok does now with the caveat that larger databases might need to move from sqlite to mysql.

  5. Henrik Ingo says:

    @John: I don’t remember if the KDE apps actually do this, but they could use MySQL Embedded as default, then use MySQL as server in a more “advanced” config.

    (And as usual, they can have MySQL server listening only to unix sockets, with network binding disabled. But then they’d have to screw with the default mysql installation somehow, which is bad for all those who really install mysql to do something else than KDE related stuff.

  6. chep says:

    I don’t understand why not just use Berkley DB?
    Seems like a perfect fit for their needs.

  7. Zenny says:

    Instead of making MySQL every where mandatory, it should have been an optional choice to the user. As the author says, netbooks peeps might not like, so for them Sqllite or even berkleydb which are very small would be a good choice instead of mysql.

    Also running mysql would be a drag in the performance? If there was a stripped version of MySql to make performance higher and size lesser mostly for smaller devices, i think such can be provided.

  8. Bryan Emrys says:

    And for those of us who use postgresql, having another database running is a waste of my system resources. Goodbye KDE