Bug 178185 - akonaditray remote MySQL server error
Summary: akonaditray remote MySQL server error
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Tom Albers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-19 15:50 UTC by René J. Pollesch
Modified: 2008-12-31 15:05 UTC (History)
1 user (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 René J. Pollesch 2008-12-19 15:50:53 UTC
Version:            (using Devel)
Compiler:          gcc 4.3 
OS:                Linux
Installed from:    Compiled sources

Akonadi is configured to use a remote MySQL server. The server processes work fine, the database connection is established and there are tables created on the remote MySQL server.

But when I want to do a backup, AkonadiTray  tells me: "The backup process ended unexpectedly". Console output shows:

mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/home/dude/.local/share/akonadi/db_misc/mysql.socket' (2) when trying to connect
akonaditray(11569) Backup::create: Executed:  "/usr/bin/mysqldump" ("--single-transaction", "--master-data=2", "--flush-logs", "--triggers", "--result-file=/tmp/kde-dude/akonadiEtvutv/db/database.sql", "--socket=/home/dude/.local/share/akonadi/db_misc/mysql.socket", "akonadi") Result:  2
Comment 1 Tom Albers 2008-12-19 15:53:32 UTC
I'll try to fix it before the 4.2.0 release. Thanks for reporting.
Comment 2 Tom Albers 2008-12-29 20:22:08 UTC
SVN commit 903038 by toma:

Make the tray application somewhat more intelligent: don't assume everyone uses a socket, but honor the kcm-settings for akonadi. As I don't have a setup with a remote server, it would be nice if you could test this for me!
BUG: 178185


 M  +1 -1      CMakeLists.txt  
 M  +4 -6      backup.cpp  
 A             global.cpp   [License: GPL (v2+)]
 A             global.h   [License: GPL (v2+)]
 M  +4 -6      restore.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903038
Comment 3 René J. Pollesch 2008-12-31 13:14:31 UTC
I just tried an up-to-date SVN build, and indeed, the original problem is gone completely for me. But then the next one appears:

akonaditray(7312) Backup::create: Executing:  "/usr/bin/mysqldump" ("--single-transaction", "--master-data=2", "--flush-logs", "--triggers", "--result-file=/tmp/kde-dude/akonadi3i4FgG/db/database.sql", "--host=192.168.128.1 --user=dude --password=xxxxx", "akonadi")
mysqldump: Got error: 1045: Access denied for user 'dude'@'correct.host.name' (using password: NO) when trying to connect

The server-side MySQL log file tells my exactly the same thing (Access denied, using password: NO etc.). This one is very strange since the correct database login is shown, even on console STDOUT. The following command works fine when I run it manually: (same user, same password, same host!)

/usr/bin/mysqldump akonadi --single-transaction --master-data=2 --flush-logs --triggers --result-file=database.sql --host=192.168.128.1 --user=dude --password=xxxxx

...et voila, this command will create a good lookin' database.sql in my current working directory.
Comment 4 Tom Albers 2008-12-31 13:29:47 UTC
SVN commit 903718 by toma:

Already woke up two nights ago, realising this bugfix was slightly off. You can not pass multiple command line options in one string, these have to be splitted. Use QStringList instead of QString for passing the options. Can you try again?
BUG: 178185


 M  +5 -5      global.cpp  
 M  +3 -3      global.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903718
Comment 5 René J. Pollesch 2008-12-31 14:30:17 UTC
Works perfect, thank you very much!

...and a happy new year :)
Comment 6 René J. Pollesch 2008-12-31 14:36:12 UTC
Oh, by the way, the default file suffix is ".tgz", but it should be a ".tar.bz2"
Comment 7 Tom Albers 2008-12-31 15:05:02 UTC
SVN commit 903813 by toma:

Use tar.bz2 suffix. Thanks for testing && happy new year!
CCBUG: 178185


 M  +1 -1      backup.cpp  
 M  +1 -1      backup.h  
 M  +2 -2      backupassistant.cpp  
 M  +1 -1      restore.cpp  
 M  +1 -1      restore.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903813