[Digikam-devel] [digikam] [Bug 366219] New: Setting up internal mysql database fails
Simon via KDE Bugzilla
bugzilla_noreply at kde.org
Thu Jul 28 21:56:00 BST 2016
https://bugs.kde.org/show_bug.cgi?id=366219
Bug ID: 366219
Summary: Setting up internal mysql database fails
Product: digikam
Version: 5.0.0
Platform: Other
OS: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: Database-Setup
Assignee: digikam-devel at kde.org
Reporter: freisim93 at gmail.com
Details
While trying to setup digiKam with internal mysql database from scratch (no
migration), I got the following error:
digikam.databaseserver: Database initializer: "mysql_install_db"
("--datadir=/home/simon/Programme/AppDaten/digikam5/.mysql.digikam/db_data")
digikam.databaseserver: "WARNING: Could not write to config file
/usr/my.cnf: Permission denied\n\nFATAL ERROR: Could not chown directory
/home/simon/Programme/AppDaten/digikam5/.mysql.digikam/db_data\n"
digikam.databaseserver: "Could not start database initializer.\nExecutable:
mysql_install_db\nArguments:
--datadir=/home/simon/Programme/AppDaten/digikam5/.mysql.digikam/db_data\nProcess
error: Unknown error"
digikam.databaseserver: Cannot start internal database server
I investigated the error in databaseserver.cpp/h. I found the error in the
arguments to mysql_install_db which missed a "--defaults-file" argument.
However new error turned up after. The error/debug messages were not conclusive
and the consistet more or less of one very long function riddled with return
statements. So I refactored databaseserver.cpp.
I am no c++ dev, so I did quite a bit of learning while writing the code.
Therefore the result is certainly not perfect. But it runs without error, gives
more information on errors and is in my opinion generally cleaner and more
readable.
I will attach patches, but the one for the cpp file is more or less useless, as
almost everything is marked as change due to the restructuring.
More detailed information can be derived from my github repository, i.e. the
commit messages in the tree intdb_init-redone
(https://github.com/imsodin/digiKam/commits/intdb_init-redone). Most of the
changes happened in "Split startMYSQLDatabaseProcess into smaller functions".
The branch is still compatible with master (at the time of writing), I will try
to keep an up-to-date version with master in the branch
"intdb_init-redone-current".
Please test it and I hope you have time to look over the code as well. Any
feedback is appreciated.
Reproducible: Always
Steps to Reproduce:
1. Start digiKam from scratch (no digikamrc, no database, no configs)
2. choose internal mysql database
Actual Results:
fails to initialise database (see error in Details)
Expected Results:
Initialise new database (which works with the patch)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list