Header Shadow Image

Linux / Akonadi: The QtSQL driver ‘QMYSQL’ is required by your current Akonadi server configuration.


Another day brings another bug. This time it's with the Akonadi server failing or unable to start.  This error followed a recent update I've done on my Fedora box.  This is what greeted me each time I started up KDE:

The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration.
The following drivers are installed: QSQLITE, QMYSQL3, QMYSQL.
Make sure the required driver is installed.

Personally, I don't like uninvited guests, especially the ones that crash the party.  So off I went to see what broke.  The error gave some clues where I should look which included MySQL, akonadi and QtSQL.  Here's how I went about resolving this one.


The solution to this one was fairly straightforward.  it followed these steps:

  1. Open command console such as konsole
  2. Check if you have the config file, run: ls -al /root/.config/akonadi/mysql-local.conf
  3. Run echo "user=root" > /root/.config/akonadi/mysql-local.conf
  4. Either type kcmshell4 kcm_akonadi on the command line to start Akonadi configuration panel or follow steps 4 & 5 below.
  5. Go to KDE Start -> System Settings
  6. Under System Settings dialog click the  Advanced tab then Akonadi configuration.
  7. Click the Akonadi Server Configuration tab then the Restart button.


Getting to the solution was another matter alltogether.  The first order of business was to check the akonadi server logs to narrow down the problem:


Database process existed unexpectedly during intial connection!
executable: "/usr/libexec/mysqld"
arguments: ("–defaults-file=/root/.local/share/akonadi//mysql.conf", "–datadir=/root/.local/share/akonadi/db_data/", "–socket=/root/.local/share/akonadi/db_misc/mysql.socket")
stdout: ""
stderr: "090322 23:25:47 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090322 23:25:47 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090322 23:25:47 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

090322 23:25:47 [ERROR] Aborting

090322 23:25:47 [Note] /usr/libexec/mysqld: Shutdown complete

exit code: 1
process error: "Unknown error"
0: akonadiserver(_Z10kBacktracev+0x35) [0x8051f75]
1: akonadiserver [0x8052456]
2: [0xc62400]
3: [0xc62416]
4: /lib/libc.so.6(gsignal+0x50) [0x1dd460]
5: /lib/libc.so.6(abort+0x188) [0x1dee28]
6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x95) [0x5886855]
7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc4) [0x8053164]
8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x9e) [0x59143ce]
9: /usr/lib/libQtCore.so.4 [0x592139e]
10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x68) [0x5921698]
11: akonadiserver(_ZN6QDebugD1Ev+0x44) [0x804d674]
12: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0x1a8e) [0x3f9e9e]
13: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x72) [0x3fbc02]
14: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x56) [0x3fcd06]
15: akonadiserver(main+0x398) [0x804c9e8]
16: /lib/libc.so.6(__libc_start_main+0xe5) [0x1c86e5]
17: akonadiserver [0x804c581]

So that error narrowed down the problem alot.  We now know Akonadi wants to run as the root user.  Or at least is trying to run as root in an unsupported manner.  First I checked with MySQL to see what they say about this even though it's an Akonadi related problem.  Here's what MySQL has to say about all of this:


Further down the page we see that to run MySQL as root we need to set:


in /etc/my.cnf which for us would amount to user=root in /etc/my.cnf.  The problem with this is that also according to the above MySQL page, you should never run the MySQL server as root.  It's also fairly common knowledge that MySQL runs as the mysql user on Fedora Linux installations at least .  So let's see what the Akonadi folks say about this I visit http://pim.kde.org/.  Then choose the Akonadi link when I get there.  Sadly nothing searchable could be dug up.  Let's try plan B.  Configuration files for applications ran from a user account, typically exist within the users home directory.  So in this case let's check your ID (Assuming root here).  So we run this command:

# cd ~;find ./ -name *akonadi*

So looks like we have some Akonadi stuff inside our user account.  Great.  Since Akonadi is giving MySQL errors it should be related.  Let's dig deeper to see what we can find inside above folders:

# cd ~/.config/akonadi/
# find ./ -iname *mysql*

# cd ~/.local/share/akonadi/
# find ./ -iname *mysql*


So looks like Akonadi has it's own mysql configuration files, which is good, and perhaps for it's own purposes it needs to run as root for a local instance of mysql (What other reason is there for another MySQL config file).  That would be safer.  But which one of the above do I put user=root under.  Checking my system, it was empty of any sort of documentation for Akonadi.  So I try the RPM:

# rpm -aq|grep akonadi
# rpm -lq akonadi-1.1.1-1.fc10.i386

But all we get is another mysql config file, which isn't helpful.  We need to know which one we need to set user=root in. 

# vi /root/.local/share/akonadi/mysql.conf
# cat /root/.local/share/akonadi/mysql.conf|head
# Global Akonadi MySQL server settings,
# These settings can be adjusted using $HOME/.config/akonadi/mysql-local.conf
# Based on advice by Kris Köhntopp <kris@mysql.com>


Which gives us the answer (green above) which we were looking for.  Doing the above but for /etc/akonadi/mysql-global.conf instead says the same thing (files are copies of each other).  Hence the SOLUTION above.  🙂

Cheers and Good Luck!

5 Responses to “Linux / Akonadi: The QtSQL driver ‘QMYSQL’ is required by your current Akonadi server configuration.”

  1. hey there, glad that u found solution for yourself.

    But I dont have any type or kind of conf file in /root/.config/akonadi/mysql-local.conf.

    Please help what can I do.
    KDE 4.2 on Archlinux.

    I have folder as /root/.config/akonadi/

    but no files in it!!!!!!!!!!! Help! please 🙂

  2. Hey Kapz,

    Appreciate the feedback.

    I’m assuming here that you’ve received the same error in the akonadiserver.error file as outlined in red above and that your path /root/.config/akonadi/ exists even though there may be no files in it.

    In this case follow step 3 above which will create the mysql-local.conf file for you. In case it doesn’t work, you can always remove the mysql-local.conf file later on.


  3. Kevin Krammer on May 2nd, 2009 at 9:44 am

    Akonadi runs as part of the user session, so it runs as root if you run your desktop session as root (bad idea)

    Configuring a user for mysql is only necessary if you want to use a system level mysqld instance, not the usual stand-alone instance started by Akonadi with files and sockets in the user’s home directory.

  4. […] a quick google shows it to be a common problem What this page has to say sounds about right to me: Linux / Akonadi: The QtSQL driver ?QMYSQL? is required by your current Akonadi server configuration. I did think about looking into the merits/possibilities of and how one would go about running […]

  5. […] de varios días de intentos frustrados y de búsquedas por foros y demás, al solución llegó por el lado de borrar los archivos de configuración de akonadi para mi […]

Leave a Reply

You must be logged in to post a comment.

  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License