Mysql, amarok and ipod – Moving over part 4

So it is time to get the last bits over from the old machine. To make the search indexes happy the new machine is an acer aspire 8920g, OS is kubuntu 8.04 Hardy Heron and my ipod is and apple ipod video 60 gb and i think they say its a iPod (5th generation).

As a lot of you know I have had some change in my personal life, so I did this work the 1:th but haven’t had time to publish it. So thats why the date is perhapes a bit missleading.

I think now its 3 major things I need to get over:

  • amarok and my music and connection to my ipod.
  • my palm and syncing the palm
  • the mobile network setting is have as a backup if networks fails.

And today we will do the amarok.

Amarok is the preferred music program that plays my mp3’s and more important it handles all my pod casts and downloads them and transfers them to my ipod. So the first thing is to get Amarok going. But to get that going I have to get the mysql databases over from the old machine.

I have already transferred over all my music collection. But amarok keeps the podcast in its own directory. And it also uses mysql and a database for ll the music collection data. Well amarok can be configured in a number fo ways but as I am using the mysql-database for other things I can as well use it for amarok.

The fist thing is to dump the databases from the old machine. I have copied over all the data but not the databases, and the best thing to use is to dump the databases with mysqldump. Over to the old machine and do the dump. I then check what databases I had on the machine, and use mysqldump for each database to a file:

And the repeat it for all the databases.

Ti start on the new machine I first have to get the right user and persmission into mysql as i plan to copy the amarok settings over. I dumped the mysql database also on the old machine just to be shure. And the user data is in the user table and the permissions is in the db table, so I edit the files and just take out the permissions and user data for the amarok db and amarok database user. Save it to a separate file. Then i ceated the amarok database and loaded the users with:

and the loaded the amarok database with:

That should take care ok the database. Now it up to the settings of amarok itself.


The config files for the amaok application is in .kde/share/config/amarokrc so i copied that from my old directory. The data for the application is in .kde/share/apps/amarok so that one to is copied over from the old directory. And now its time to start up nd test.

Starting amaork works fine – no error messages or anything and all my podcasts shows up. But nothing in the collection. None of my old album is in there,. Strange.

So after some more digging and googeling I found out that not only does the amarok stores the songs and albums and info in the database – it also stores the disk id’s in there. That to be able to handle removable disks and so its kind of god – but in this case its a bad thing.

The database table it is storing the information in is devices, so I cleaned out the amarok database and just started it up blank so it would fill in the information. I then dumped the database out and edited the old database dump so it reflected the new devices. I then reloaded the database but it still did not work.

Well I gave up the idea of reloading the database and just did a rescan of the music and that also worked.


So now when the amarok is working and downloading the podcasts I am listening to I need to get the ipod syncing going also.

So fist thing is just to plug it in and see if the system recognize it. And ofcause it does, and ask what to do with it. For now I select noting as im just testing. I had amarok turned of as i did not what that to interfere yet and it did not pop up and start automatically.

So eject the ipod and …. wait – that did not work. Ipod still attached. Eject again – noting works – now its not even mounted on the system but still connected according to the ipod – I hate hardware. Unpluging it did not make anything so i have to reset the ipod. I found the link to how to reset it here>>.

So reset the ipod and that did not damage the ipod and more googeling.

Apparently its a change in the udev system that makes the problem. I could plug in the ipod and do a sudo eject, and that worked but its kind of inconvenient and also – amarok will not make that working.

Aparently at a Gutsy system udev would assign group rights of “plugdev” to USB portable storage, and Hardy is assigning “disk”.

Changing one line in /etc/udev/rules.d/40-permissions.rules will make it works. Its the line:

This line is new in Hardy. After commenting it out I now get the right permissions and both the eject command works as expected and amarok works as it should.

So i did:

And then I did

to have the udev system to reload the configurations. As far as i se its now fully working.

The last thing is to get amarok and ipod to work together and as I had the old one in the database and in the config, but that did not fully worked, I removed the old ipod from amarok and just added and new one and that worked perfectly.

4 thoughts on “Mysql, amarok and ipod – Moving over part 4

  1. Hello!
    Very Interesting post! Thank you for such interesting resource!
    PS: Sorry for my bad english, I’v just started to learn this language 😉
    See you!
    Your, Raiul Baztepo

  2. Hi !! 🙂
    I am Piter Kokoniz. Just want to tell, that your posts are really interesting
    And want to ask you: is this blog your hobby?
    Sorry for my bad english:)
    Thank you!

  3. I started the blog for 3 reasons.
    1. To document mo work on Linux for myself.
    2. To have it sp that it might help others
    3. To write a blog.

    So I guess its a bit of all.

  4. I came across this post while trouble shooting my amarok mysql db transfer. I hate it when I make stupid mistakes…thank you for documenting your process.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.