Bug 193644 - Akonadi server cannot create database in external mysql
Summary: Akonadi server cannot create database in external mysql
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Volker Krause
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-22 16:03 UTC by Robin Atwood
Modified: 2010-06-14 12:40 UTC (History)
2 users (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 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.