The MySQL command proposed by Amarok "GRANT ALL ON amarokdb.* TO 'user'@'host' IDENTIFIED BY 'pw';" to grant the MySQL user access to amarokdb does not work for non-local hosts. Amarok replaces 'host' by the specified hostname of the MySQL server. However in the above command 'host' should be the name of the client Amarok is running on.
Please upgrade your Amarok version to 2.2.2 and try again. See also http://kubuntu.org/news/amarok-2.2.2
The problem persists with Amarok 2.2.2.
Thank you for your feedback.
This is perfect for a junior job, if anyone is interested.
I am interested. I need some time though...
on my machine GRANT ALL PRIVILEGES ON ... was required intead of just GRANT ALL ON
OK, and what machine is that? What version of mysql, what distro and version, what's the configuration like?
MySQL reference manual says that "PRIVILEGES" is optional (http://dev.mysql.com/doc/refman/5.1/en/grant.html) but I'll change it anyways.
commit 7acf6eba0ff9ce4f9c2828bee5d94efb24763053 Author: Jeff Mitchell <mitchell@kde.org> Date: Sun Mar 14 21:34:33 2010 -0400 Change the MySQL commands for better wording and to remove host restrictions. BUG: 225052 diff --git a/ChangeLog b/ChangeLog index c9f960b..96fe203 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,9 @@ VERSION 2.3.1-Beta 1 CHANGES: * Allow moodbar files witout the leading '.' (both .<trackfilename>.mood and <trackfilename>.mood now work) + * Change example SQL command for setting up an external database to remove + (sometimes incorrect) host name and possibly fix some random regression in + some MySQL versions. (BR 225052) BUGFIXES: * Cover fetcher: Fixed a crash involving reappearing cover found dialogs diff --git a/src/configdialog/dialogs/DatabaseConfig.cpp b/src/configdialog/dialogs/DatabaseConfig.cpp index 5b2130b..68885ad 100644 --- a/src/configdialog/dialogs/DatabaseConfig.cpp +++ b/src/configdialog/dialogs/DatabaseConfig.cpp @@ -91,10 +91,9 @@ DatabaseConfig::updateSQLQuery() //SLOT // Don't print the actual password! const QString examplePassword = i18nc( "A default password for insertion into an example SQL command (so as not to print the real one). To be manually replaced by the user.", "password" ); - query = QString( "GRANT ALL ON %1.* TO '%2'@'%3' IDENTIFIED BY '%4';\nFLUSH PRIVILEGES;" ) + query = QString( "CREATE DATABASE %1;\nGRANT ALL PRIVILEGES ON %1.* TO '%2' IDENTIFIED BY '%3'; FLUSH PRIVILEGES;" ) .arg( kcfg_Database->text() ) .arg( kcfg_User->text() ) - .arg( kcfg_Host->text() ) .arg( examplePassword ); } text_SQL->setPlainText( query ); diff --git a/src/configdialog/dialogs/DatabaseConfig.ui b/src/configdialog/dialogs/DatabaseConfig.ui index 568feca..5df65ad 100644 --- a/src/configdialog/dialogs/DatabaseConfig.ui +++ b/src/configdialog/dialogs/DatabaseConfig.ui @@ -172,7 +172,7 @@ <item> <widget class="QLabel" name="label_SQL"> <property name="text"> - <string>Access rights can be assigned with the following S&QL commands (after replacing the password with the correct one):</string> + <string>If your database is not already set up, you can use the following S&QL commands (after replacing the password with the correct one):</string> </property> <property name="wordWrap"> <bool>true</bool>
It's mysql-5.0.88 on gentoo amd64. Just retested, if I type without PRIVILEGES all privileges get set to not allowed. Although mysql says it's optional.