Bug 388248 - 2017-12-26 - Unable to start mysql plugin
Summary: 2017-12-26 - Unable to start mysql plugin
Status: RESOLVED WORKSFORME
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: kf5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 2.9
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-26 14:10 UTC by Evert Vorster
Modified: 2022-12-21 05:19 UTC (History)
3 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 Evert Vorster 2017-12-26 14:10:40 UTC
Hi there!

I am the maintainer for a handful of Arch Linux packages in aur, and also a long time fan of Amarok. 
Currently I am trying to make a package for Arch of the KF5 port of Amarok. 

I managed to get it to compile without too many issues, but when running it, I get a popup stating:"

The Amarok database reported the following errors:
The configured database plugin could not be loaded.
In most cases you will need to resolve these errors before Amarok will run properly."

When running amarok in debug mode, I get the following error message:
-----snip-------
amarok:   BEGIN: MainWindow::MainWindow()
amarok:     BEGIN: Plugins::PluginManager::PluginManager(QObject*)
amarok:       BEGIN: void Plugins::PluginManager::checkPluginEnabledStates()
amarok:         [WARNING] [PluginManager] Plugin "amarok_storage-mysqlestorage" has frameworks version 0 . Version 73 is required
amarok:         [PluginManager] found plugin: "amarok_storage-mysqlestorage" enabled: false
amarok:         [WARNING] [PluginManager] Plugin "amarok_storage-mysqlserverstorage" has frameworks version 0 . Version 73 is required
amarok:         [PluginManager] found plugin: "amarok_storage-mysqlserverstorage" enabled: false
amarok:         [WARNING] [PluginManager] Plugin "amarok_collection-mysqlcollection" has frameworks version 0 . Version 73 is required
amarok:         [PluginManager] found plugin: "amarok_collection-mysqlcollection" enabled: false
amarok:         [PluginManager] 3 plugins in total
amarok:         [PluginManager] Creating factory for plugin: "amarok_storage-mysqlestorage"
amarok:         [WARNING] [PluginManager] Plugin "amarok_storage-mysqlestorage" has frameworks version 0 . Version 73 is required
amarok:         [PluginManager] Creating factory for plugin: "amarok_storage-mysqlserverstorage"
amarok:         [WARNING] [PluginManager] Plugin "amarok_storage-mysqlserverstorage" has frameworks version 0 . Version 73 is required
amarok:         [PluginManager] Creating factory for plugin: "amarok_collection-mysqlcollection"
amarok:         [WARNING] [PluginManager] Plugin "amarok_collection-mysqlcollection" has frameworks version 0 . Version 73 is required
amarok:         BEGIN: StorageManager::StorageManager()
amarok:         END__: StorageManager::StorageManager() [Took: 0s]
amarok:         BEGIN: ServicePluginManager::ServicePluginManager()
amarok:         END__: ServicePluginManager::ServicePluginManager() [Took: 0s]
amarok:       END__: void Plugins::PluginManager::checkPluginEnabledStates() [Took: 0.15s]
---------snip------------

I believe this to be the root of my problem, but have n clue as to how to fix it, as the plugins in question are installed by amarok itself, and thus HAS to be the proper version....

Any help in resolving this would be greatly appreciated. 

Kind regards,
-Evert-
Comment 1 Martijn Schmidt 2018-01-02 02:34:27 UTC
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.
Comment 2 Martijn Schmidt 2018-01-02 02:35:00 UTC
See also: https://bugs.gentoo.org/641060
Comment 3 Justin Zobel 2022-11-21 08:21:44 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-12-06 05:16:50 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-12-21 05:19:18 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!