Manage Your Amarok Music Collection with MySQL

Amarok is a powerful music player for Linux, Unix and Windows OS with an intuitive interface. It makes playing the music you love and discovering new music easier than ever before – and it looks good doing it! It can be used to organize a library of music into folders according to genre, artist and album. It can edit tags attached to most music formats, associated album art, attach lyrics and automatically “score” music by keeping play count statistics.

Amarok uses an embedded MySQL database to manage music collections. If you don’t want to dump all your local hard drive with large volume of music files and wish to manage your music collections with an external database, then Amarok has a option for that too.

In this article, let us see how to manage music collections with external MySQL database. It will work on all platforms that supports MySQL. Here, I use Ubuntu 13.04 for this tutorial.

Install MySQL

If you haven’t installed MySQL before, install it use the following command:

sk@sk:~$ sudo apt-get install mysql-server mysql-client

During installation, it will ask you to set the password for MySQL root user password. Enter the password twice and continue the installation.

Create MySQL database for Amarok

Let us create a database called amarokdb and database user amarokuser with password ubuntu. Change these values as per your requirement:

sk@sk:~$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 42
Server version: 5.5.31-0ubuntu0.13.04.1 (Ubuntu)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database amarokdb;
Query OK, 1 row affected (0.01 sec)

mysql> GRANT ALL ON amarokdb.* TO amarokuser@localhost IDENTIFIED BY 'ubuntu';
Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> exit
Bye

Configure Amarok

Open Amarok. Go to Settings -> Configure Amarok -> Database. In the database section click on Use external MySQL database checkbox. Enter the MySQL server IP Address, user and database details and click the Apply button.

Configure – Amarok_020Here 192.168.1.200 is my external MySQL server IP Address. Now add music files to your Library and Enjoy! You don’t have to worry about local disk space now.