Announcement

Collapse
No announcement yet.

Where are the amarok MySQL database stored?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Where are the amarok MySQL database stored?

    Where are the amarok MySQL database stored? is restoring an old database as simple as copying a file from my old installation? Do I have to type anything in the konsole to initiate it properly?

    #2
    Re: Where are the amarok MySQL database stored?

    The MySQL database would be stored on whatever MySQL server you've set it up with... if you've set amarok to use it, that is.

    The SQLite database, if that is what you have chosen (or it may be the default, I forget) is stored in ~/.kde/share/apps/amarok/collection.db along with your playlists and other data... it should be relatively straightforward to copy things across to a new install.

    Comment


      #3
      Re: Where are the amarok MySQL database stored?

      Originally posted by JamesM
      The MySQL database would be stored on whatever MySQL server you've set it up with... if you've set amarok to use it, that is.
      Where does the MySQL server normally save its database? can I copy that file from somewhere?

      Comment


        #4
        Re: Where are the amarok MySQL database stored?

        so I can't copy the mysql ratings file from somewhere?

        Comment


          #5
          Re: Where are the amarok MySQL database stored?

          MySQL is a database server; you generally don't interact with its storage files. You interact with it by using an SQL client.

          If you're looking to copy a database between MySQL servers, then you'll want to do something like

          On the old machine: mysqldump -u amarok -ppassword databasename > amarok.sql

          Copy the file amarok.sql to the new machine

          On the new machine: mysql -u something -psomethingelse < amarok.sql

          You'll have to replace the bits in italic to whatever your configuration is.

          Comment


            #6
            Re: Where are the amarok MySQL database stored?

            The actual data is stored in /var/lib/mysql

            However you will really need to import the data after exporting it from the old database. If you are not used to CLI manipulation of mysql (I know I am not for it is a dark and evil art practiced only by gnarly wizened BOFHs) a mysql front end to connect to the server is the answer. Many good ones exist, but the easiest IMHO is phpmyadmin or you you could use the mysql-admin package which is a rather nice gtk frontend.

            The table you want is called statistics in the amarok database.

            Comment


              #7
              Re: Where are the amarok MySQL database stored?

              Originally posted by stealthbanana
              The actual data is stored in /var/lib/mysql. However you will really need to import the data after exporting it from the old database... The table you want is called statistics in the amarok database.
              Originally posted by JamesM
              MySQL is a database server; you generally don't interact with its storage files. You interact with it by using an SQL client.
              Thanks for the replies .

              Can I still make a dump if that linux installation is stuffed? Maybe through recovery using the installation cd? except that logs in as root instead of my user?

              Comment


                #8
                Re: Where are the amarok MySQL database stored?

                Originally posted by stealthbanana
                The actual data is stored in /var/lib/mysql
                Or, Can I copy /var/lib/mysql from the dead linux to a new linux install and access it using mysql tools?

                Comment


                  #9
                  Re: Where are the amarok MySQL database stored?

                  So i take it theres no way to restore an old mysql to another computer without being able to log into the mysql on the old computer to make a dump?

                  Comment


                    #10
                    Re: Where are the amarok MySQL database stored?

                    If you have the raw files, you should just be able to drop them in to or copy the entirety to /var/lib/mysql/amarok on the new machine.

                    Comment


                      #11
                      Re: Where are the amarok MySQL database stored?

                      Originally posted by stealthbanana
                      If you have the raw files, you should just be able to drop them in to or copy the entirety to /var/lib/mysql/amarok on the new machine.
                      I copied the raw files. Should I have to rebuild the collection if I havn't already done that? or should it get that from the raw files. Also is there anything i need to prep the myssql database?

                      and hey thanks for checking on this thread. I really appreciate your help. I have this thread favourited just incase you or JamesM have any updates.

                      Comment


                        #12
                        Re: Where are the amarok MySQL database stored?

                        YUS I figured it out!.

                        Thanks Stealthbanana and JamesM

                        1. I copied the '/var/lib/mysql ' to my new computer
                        2. I followed the instructions from the MySQL HowTo (which is what i did on my old computer)
                        a. sudo apt-get install mysql-server (chose PASSWORD_CHANGE_ME when asked)
                        b. mysql -p -u root
                        CREATE DATABASE amarok;
                        USE amarok;
                        GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD_CHANGE_ME';
                        FLUSH PRIVILEGES;
                        c. load amarok. (already had mysql collection settings: host"localhost" Database"amarok" Username"amarok" Password"PASSWORD_CHANGE_ME"


                        Also I think this solution may be dependent on having the songs stored in the same location as the original database? Wasn't a problem for me coz it was actually the same computer, not a new one.

                        Anyway. That is the end of my frustration. I'd actually abandoned linux because of losing my amarok stuff, but now I have a reason to use it again!

                        Comment

                        Working...
                        X