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

Importing MySQL database

Tags: amarok, mysql, import amarok, mysql, import amarok, mysql, import
(comma "," separated)
peppergrower
Registered Member
Posts
25
Karma
0
OS

Importing MySQL database

Tue Aug 25, 2009 7:06 am
I just switched from Ubuntu 8.10 to Arch, and in an effort to preserve my ratings, play counts, etc. I dumped my MySQL Amarok database prior to installing Arch. However, I'm now using Amarok 2.1.1 (vs. 1.4), and in the new version I don't see any way to configure an external MySQL database. I found some discussion that such should be possible, but I just don't how to do it in the configuration options.

Is this possible? Or if not, is there some way to import the data into Amarok's newly embedded database?
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS

Re: Importing MySQL database

Tue Aug 25, 2009 7:56 am
Not in the 2.1.1 version, no, it is supposed to work in Amarok 2.2, to be released in a few weeks.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
peppergrower
Registered Member
Posts
25
Karma
0
OS

Re: Importing MySQL database

Tue Aug 25, 2009 8:14 am
Hm, okay. I'll be looking forward to that release, then. :) Thanks for the help!
User avatar
Dieter Schroeder
Registered Member
Posts
714
Karma
7
OS

Re: Importing MySQL database

Tue Aug 25, 2009 2:59 pm
External MySQL is possible, but won't help here, because of DB layout changes.
But there is a way to import your data into A2:
Convert your MySQL DB to a SQLite db, so you can import it.
Check the Amarok wiki on how to do that.

m0nk
venquessa
Registered Member
Posts
10
Karma
0
OS

Re: Importing MySQL database

Sat Nov 14, 2009 5:36 pm
Yes and a warning about this would have been awfully cool!

I lost ALL my ratings (again!).

God damn pain the *** if you ask me, not a happy bunny. A warning, "The database will be rebuilt if you want to import an Amarok 1.4 DB then please read this" or something.

I have 8,000 tracks and I usually listen to them in either random across the entire collection or I sort by rating. I also use the ratings for updating the car USB key of music by dragging all rated tracks to it.

All gone. Thanks.

My fault for not backing up the DB? Yes, but I trusted Amarok to be sensible like Linux application should. Foolish.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: Importing MySQL database

Sun Nov 15, 2009 10:06 am
venquessa wrote:Yes and a warning about this would have been awfully cool!

I lost ALL my ratings (again!).

God damn pain the *** if you ask me, not a happy bunny. A warning, "The database will be rebuilt if you want to import an Amarok 1.4 DB then please read this" or something.

I have 8,000 tracks and I usually listen to them in either random across the entire collection or I sort by rating. I also use the ratings for updating the car USB key of music by dragging all rated tracks to it.

All gone. Thanks.

My fault for not backing up the DB? Yes, but I trusted Amarok to be sensible like Linux application should. Foolish.


Well sorry about that. A backup would have been a good idea, of course.

Anyway, version 2.2.1 comes with a fix for that, as far as I know. So maybe better luck this time :)


--
Mark Kretschmann - Amarok Developer
peppergrower
Registered Member
Posts
25
Karma
0
OS

Re: Importing MySQL database

Sun Nov 15, 2009 10:45 pm
markey wrote:Anyway, version 2.2.1 comes with a fix for that, as far as I know. So maybe better luck this time :)

Hey, OP here (not the person who just lost all their ratings). So are you saying that version 2.2.1 will import Amarok 1.4 databases and transfer over ratings, etc., or are you saying it'll simply warn you before wiping them out?
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: Importing MySQL database

Mon Nov 16, 2009 7:11 am
peppergrower wrote:
markey wrote:Anyway, version 2.2.1 comes with a fix for that, as far as I know. So maybe better luck this time :)

Hey, OP here (not the person who just lost all their ratings). So are you saying that version 2.2.1 will import Amarok 1.4 databases and transfer over ratings, etc., or are you saying it'll simply warn you before wiping them out?


Yes, Amarok 2.2.1 _should_ be able to do that. We have fixed a number of bugs in the importer.

However, seeing that anything can wrong, I cannot guarantee you this. Therefore I recommend making a backup first, then trying it :)


--
Mark Kretschmann - Amarok Developer
peppergrower
Registered Member
Posts
25
Karma
0
OS

Re: Importing MySQL database

Mon Nov 16, 2009 7:25 am
markey wrote:Yes, Amarok 2.2.1 _should_ be able to do that. We have fixed a number of bugs in the importer.

However, seeing that anything can wrong, I cannot guarantee you this. Therefore I recommend making a backup first, then trying it :)

Heh, definitely. I'm not terribly attached to my ratings and such, but I'd like to hold onto them. :) Thanks for the heads up on the new feature!
User avatar
Oceanwaves
Registered Member
Posts
64
Karma
0
OS

Re: Importing MySQL database

Tue Nov 17, 2009 6:22 am
markey wrote:Yes, Amarok 2.2.1 _should_ be able to do that. We have fixed a number of bugs in the importer.


Hi,

I also tried to import my MySQL database used with Amarok 1.4 into Amarok 2.2. I noticed that I lost some, but not all ratings.

However, I noticed that all the lyrics now show XML tags which are not interpreted anymore:

All lyrics start with something like
Code: Select all
<?xml version='1.0' encoding='UTF-8'?><lyrics artist='Madonna' site_url='lyricwiki.org' page_url='http://lyricwiki.org/index.php?title=Madonna%3AOh_Father' title='Oh Father' site='LyricWiki' add_url='http://lyricwiki.org/index.php?title=Madonna%3AOh_Father&amp;action=edit'>

and end with
Code: Select all
</lyrics>


Sometimes they also include coded special characters like
Code: Select all
You can&apos;t hurt me now


Is there a way to either remove all these tags automatically or to get Amarok to translate them after I imported the database? I still have my Amarok 1.4 database, but I uninstalled Amarok 1.4 already and was using Amarok 2.2 very extensively since then.

My collection contains ~10,000 songs and 80% of them have lyrics...

Oliver
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: Importing MySQL database

Tue Nov 17, 2009 7:46 am
Oceanwaves wrote:
markey wrote:Yes, Amarok 2.2.1 _should_ be able to do that. We have fixed a number of bugs in the importer.


I also tried to import my MySQL database used with Amarok 1.4 into Amarok 2.2. I noticed that I lost some, but not all ratings.


Please read carefully. 2.2.0 is not the same as 2.2.1.


--
Mark Kretschmann - Amarok Developer
User avatar
Oceanwaves
Registered Member
Posts
64
Karma
0
OS

Re: Importing MySQL database

Tue Nov 17, 2009 9:28 pm
markey wrote:
Oceanwaves wrote:
markey wrote:Yes, Amarok 2.2.1 _should_ be able to do that. We have fixed a number of bugs in the importer.


I also tried to import my MySQL database used with Amarok 1.4 into Amarok 2.2. I noticed that I lost some, but not all ratings.


Please read carefully. 2.2.0 is not the same as 2.2.1.

Yes, I know. But since I already imported my 1.4 MySQL database with Amarok 2.2.0, fixed bugs in 2.2.1 will not help me. I'm using Amarok 2.2.0 now, but I definitely will not fix 8.000 lyrics manually.

I still don't know if this was a bug in the 2.2.0 importer. But is there any chance to fix the imported lyrics? Or is Amarok 2.2.x still alpha or beta? I thought these are official releases. Nevertheless I lost many ratings, and all lyrics contain useless xml tags.

Amarok 1.4 was using those tags, Amarok 2.2.0 seems to ignore them.

Currently I think it wasn't a good idea to switch to Amarok 2.x already. Maybe I should go back to V1.4 and wait for a stable 2.x that will handle correctly what is the most valuable part of Amarok for me: my collection.

Oliver


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell