Bug 193644

Summary: Akonadi server cannot create database in external mysql
Product: [Frameworks and Libraries] Akonadi Reporter: Robin Atwood <robin.atwood>
Component: serverAssignee: Volker Krause <vkrause>
Status: RESOLVED FIXED    
Severity: normal CC: matej, robin.atwood
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Robin Atwood 2009-05-22 16:03:13 UTC
Version:           4.2.3 (using KDE 4.2.3)
Compiler:          gcc version 4.2.3 (Gentoo 4.2.3 p1.0) 
OS:                Linux
Installed from:    Gentoo Packages

When I start the server I get the message:

$ [akonadiserver] Unable to open database "Unknown database 'akonadi' QMYSQL: 
Unable to connect"

when akonadi is configured to use an external mysql server. If I create create the akonadi database myself using the mysql client, the akonadi server then works. Akonadi worked fine with the internal mysql server.

akonadiserverrc contains:

[%General]
Driver=QMYSQL

[QMYSQL]
Name=akonadi
User=root
Password=********
Options="UNIX_SOCKET=/var/run/mysqld/mysqld.sock"
ServerPath=/usr/sbin/mysqld
StartServer=false
Host=localhost

[Debug]
Tracer=null
Comment 1 Volker Krause 2009-11-04 15:36:12 UTC
SVN commit 1044718 by vkrause:

Create the database if it's not there yet when using an external MySQL
server.

BUG: 193644


 M  +33 -1     akonadi.cpp  
 M  +1 -0      akonadi.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1044718
Comment 2 Matěj Laitl 2010-06-14 12:40:54 UTC
No no no, the patch is incorrect!

It adds following line: if ( !query.exec( QLatin1String( "CREATE DATABASE akonadi" ) ) ) {

How do you know that the database should be names "akonadi"? It this the default, but user may have configured it to another name, especially when using extrenal MySQL database.

I cannot reopen the bug. If this gets unnoticed because the bug is closed, I will open a new one.