This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Setting up external MySQL DB

Tags: None
(comma "," separated)
optiluca
Registered Member
Posts
9
Karma
0

Setting up external MySQL DB

Sun Jul 31, 2011 9:12 am
Hi all. I expect this to have been covered a billion times, but all the documentation regarding migrating to an external MySQL DB doesn't seem to be helping me, so I figured I'd ask here ;D

##RANT##
So... my database has been eaten for the billionth time, I've done my round of bug reporting (again) and I am a bit sick of losing all my statistics, which are the main reason one would use an "advanced" player like amarok rather over mplayer or whatever...
##END OF RANT##

Would running an external MySQL DB improve the situation by any chance? If yes, would anyone like to give me a hand? o)

Basically, I have installed mysql. If I type "mysql" as my normal user, I get a nice little prompt from mysql. Opening amarok's settings -> Database section tells me the first thing I should be running from this prompt is:

CREATE DATABASE amarokdb;


So, here goes
Code: Select all
mysql> CREATE DATABASE amarokdb;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'amarokdb'


No dice. Any ideas? I have gotten past this stage in the past by running things as root, but that has just caused issues at later stages, so I figured I'd try follow everything verbatim and inquire as to why it is failing miserably here...
User avatar
Sentynel
KDE Developer
Posts
285
Karma
1
OS

Re: Setting up external MySQL DB

Sun Jul 31, 2011 2:25 pm
Amarok's internal database is still MySQL. They're functionally identical. So no, setting up an external database won't produce any differences whatsoever in how it operates. It just means you need a separate MySQL server process running and is generally a pain. It has specific uses for sharing a database between computers, but it's not worth it otherwise. If you don't know how to setup MySQL already, this is not a good reason to start.


You can enable writing statistics to the files themselves so they'll be recovered by the scanner in case of database loss. You can also backup the embedded MySQL db - it's just stored in ~/.kde/share/apps/amarok/mysqle (may be .kde4 on some distros).


optiluca
Registered Member
Posts
9
Karma
0

Re: Setting up external MySQL DB

Sun Jul 31, 2011 3:20 pm
Hi.

Is the writing of statistics to file still a feature? I thought it only appeared briefly and was then ditched because it meant that the file tags had to be rewritten every time the track was played which constitutes a bad idea. I thought all it wrote now was the star rating (which I am not too fussed about).

Anyway, I do keep backups of .kde4/share/apps/amarok as I have been stung so many times in the past. On the update to KDE 4.7 I removed my .kde4 folder to avoid weird issues, and simply restored the amarok subfolder after having logged in for the first time. After the first startup half of the playcounts had reset to zero, for some reason they seem to be coming back after a few forced collection rescans...

Anyway, just hoped that external mysql could fix the atrocity of amarok's DB, but apparently not...

PS I want sqlite back!! :'(
User avatar
Sentynel
KDE Developer
Posts
285
Karma
1
OS

Re: Setting up external MySQL DB

Sun Jul 31, 2011 3:32 pm
Writing statistics, which includes the playcount and score, to file is an option in the collections settings, as it has been since it was introduced.

SQLite is SLOW, and I rather doubt it would be immune to whatever is causing database issues anyway. You really don't want it back if you have more than a couple of thousand tracks.




Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft