View Full Version : Setup Amarok to use a MySQL database
Ashex
May 12th, 2007, 08:36 AM
I just got done setting this up, and it was a wee bit tricky for me, as such I've decided to write a tutorial for others to use :)
First up, we want to install mysql
sudo apt-get install mysql-server mysql-client libmysqlclient12-dev
As soon as that is done and out of the way, we're going to want to set the password for the root account in mysql, just to be safe :)
mysqladmin -u root password NEWPASSWORD
And of course, instead of NEWPASSWORD, use your own :)
As soon as that is out of the way, we want to create a database and user for amarok to use.
mysql -p -u root
CREATE DATABASE amarok;
USE mysql;
GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD_CHANGE_ME';
FLUSH PRIVILEGES;
For those of you who are using a remote server, you'll need to edit the my.cnf file to accept outside connection, as MySQL is by default set to only allow connections from localhost.
sudo nano /etc/mysql/my.cnd
Locate the line that appears as such:
bind-address = 127.0.0.1
And modify it to look as such:
#bind-address = 127.0.0.1
then restart the mysql service
sudo /etc/init.d/mysql restart
We've now have a user and database setup for amarok to use. Time to open up amarok!
In amarok, go to settings> configure amarok
Click on the Collection icon in the left navigation bar.
Click the drop-down bar and select MySQL.
Use the following settings:
Hostname: 127.0.0.1
Database: amarok
Port: 3306
Username: amarok
Password: Your Password
Note: The default port for MySQL to accept connections is 3306, and use your own passowrd :)
Click Apply and you will now be connected to your own MySQL database :)
goodtimetribe
May 16th, 2007, 05:34 AM
I couldn't get this to work. Either using a local fresh install of mysql or a new remote server and database either. Locally I got some errors on those mysql commands. Is that feisty? Should it matter? I wouldn't think so.
larsemil
May 18th, 2007, 04:16 PM
your guide did not work for me either, allthough i got it working without any bigger problems myself.
and changing to mysql amarok is so much faster now. really a big difference.
Dano18
May 19th, 2007, 08:07 PM
Your guide didn't work for me either, and I'm really wanting to get this straightened out.
Right now my problem is just installing mySQL, I haven't even gotten to Amarok yet.
I'm unable to install libmysqlclient12-dev. When i try to apt-get install it, it responds with
Package libmysqlclient12-dev is not available, but is referred to by another package.
I found libmysqlclient15-dev in the synaptic and I installed that, but I'm still running into problems. Any help would be greatly appreciated, thanks.
likwid
May 19th, 2007, 10:32 PM
http://amarok.kde.org/amarokwiki/index.php/MySQL_HowTo
There's a couple of semicolons missing from end of mysql commands.
Dano18
May 20th, 2007, 01:26 AM
Thanks likwid I got it working. And to answer my own question, libmysqlclient15-dev does work instead of libmysqlclient12-dev.
asymmetric
May 25th, 2007, 12:15 AM
just a note.. you should type
mysqladmin -u root -p create amarok
(without database)
then
mysql -u root -p
now you're logged in.
then
grant all on amarok.* to amarok@localhost identified by yourpasshere ;
flush privileges;
when in mysql, remember the semicolons ;
that's it
byez :)
asy
theseeker
May 25th, 2007, 02:10 PM
then
grant all on amarok.* to amarok@localhost identified by yourpasshere ;
flush privileges;
when in mysql, remember the semicolons ;
that's it
byez :)
asy
When I type that, an error occurs:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'yourpasshere' at line 1
Why?
dave_walton
May 25th, 2007, 04:14 PM
When I type that, an error occurs:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'yourpasshere' at line 1
Why?
Try this:
$ mysql -p -u root
CREATE DATABASE amarok;
USE mysql;
GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD_CHANGE_ME';
FLUSH PRIVILEGES;
rich.bradshaw
June 1st, 2007, 06:27 PM
Yep, using offical amarok instructions works great. password is to be inside the ' s if you are wondering.
Nice speed up, and the coolness of mysql!
Ashex
June 2nd, 2007, 08:28 PM
I've updated the tutorial with various modifications. Sorry about the trouble guys!
walt+walt
July 6th, 2007, 09:48 AM
I have tried this how-to with its different ways to configure mysql for amarok.
I think I got pretty far, but keep stopping at the password-entry. A selection of my tries is shown here:
----------------------------------------------------------------------------------------
root@ubuntu:~# mysqladmin -u root -p create amarok
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
root@ubuntu:~# mysqladmin -u root -p create amarok
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
root@ubuntu:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@ubuntu:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
------------------------------------------------------------------------------------------------
I do run feisty on desktop. I also reinstalled MySql a couple of times - cause I thought the prob is better solved with a blank version: As Password I always used my root-password (single-machine - songle user).
Really, I have tried many forums but never found the clue.
Please, please help a grufty who has to show his guest that he's still alive and up-to-date. smile.
many thanks, walt
walt+walt
July 6th, 2007, 10:25 AM
Ashex, you wrote:
ve updated the tutorial with various modifications. Sorry about the trouble guys!
where can I find the updated version?? I have tried the one at the beginning of this thread - but that didn't want to do it.
Many thanks for your assistance and cheeers, walt
g0kb3rk
September 19th, 2007, 03:17 PM
Thanks for the topic and the tips, I got a question to ask (which doesn't have to be in a new topic). I don't recall that I set a password for the database and yet either if I did, I couldn't remeber what it was.
mysqladmin -u root password NEWPASSWORD
after this code
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
the reply is above. Is there something wrong that I did?
hfw
September 24th, 2007, 12:20 AM
Thanks for the tutorial. hopefully everything goes smoothly. I love Amarok, but have always found it to be slow. (I have about 30,000 tracks) Hopefully the move to mySQL will help. We will find out as soon as it finishes building the database.
hal
netimen
October 23rd, 2007, 09:29 AM
I want to reinstall my system switching from 64 bit Ubunt to 32 bit one. How do I transfer my amarok mysql database?
Lostincyberspace
November 5th, 2007, 06:27 AM
Is it all on your system or do you want to keep a lot of podcasts.
If its all on an accessible (after install) then just redo the config at the first start up.
If you have a lot of podcasts to keep then backup you database in mysql (Google it, i don't remember the code) then replace after install and configuring of amarok (youmight not have to dothis but i think amarok might write overite if you don't)
Hope this helps I did the first with my system add it all went fine. Even over ntfs.
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.