https://bugs.kde.org/show_bug.cgi?id=388248

Martijn Schmidt <martijn.schm...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martijn.schm...@gmail.com

--- Comment #1 from Martijn Schmidt <martijn.schm...@gmail.com> ---
Hi Evert!

I've happily used Amarok KF5 for over two years now, at this moment in
combination with MariaDB 10.2.11. The embedded database plugin has never worked
for me on the KF5 version, and since libmysqld has been deprecated I doubt the
developers will spend any time fixing it. The "external" MariaDB database works
well, though.


If I recall the setup process correctly, the "gotcha" here was that when Amarok
uses server "localhost" it will actually connect via UNIX sockets. This means
that Amarok's suggested command:

GRANT ALL PRIVILEGES ON nameofdatabase.* TO 'nameofuser' IDENTIFIED BY
'fancypassword';

Should actually be:

GRANT ALL PRIVILEGES ON nameofdatabase.* TO 'nameofuser'@'localhost' IDENTIFIED
BY 'fancypassword';

Those interested in significance of this difference can read more in the
reference manual, search for the sentence "The server uses sorting rules" on
the following page:
https://dev.mysql.com/doc/refman/5.7/en/connection-access.html

I'm not a programmer myself, but perhaps someone from the KDE project could
make a change which roughly achieves the following in
https://cgit.kde.org/amarok.git/tree/src/configdialog/dialogs/DatabaseConfig.cpp
to clarify this for the users?

Add a %4 variable and another \n while we're at it anyway:

query = QString( "CREATE DATABASE %1;\nGRANT ALL PRIVILEGES ON %1.* TO '%2'
IDENTIFIED BY '%3'@'%4';\nFLUSH PRIVILEGES;" )

If kcfg_Host->text() equals QLatin1String("localhost") then %4 should become
'localhost', else %4 should become the character '%' which means "any host" to
the database.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to