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

[SOLVED] corrupted MySQL database

Tags: None
(comma "," separated)
mtobias
Registered Member
Posts
2
Karma
0

[SOLVED] corrupted MySQL database

Mon Oct 08, 2007 4:10 pm
After several years as a happy Amarok user I've managed to corrupt my MySQL database.
I'm running the latest/greatest version of Amarok 1.4.7 and the symptom is that the statistics aren't being updated for any of my new songs, while old songs appear to be ok (I have about 8,000 songs).

If I run Amarok from a shell, I see the following when it's trying to update the statistics:

amarok:  [CollectionDB] MYSQL INSERT FAILED: Duplicate entry '0' for key 5
amarok: FAILED INSERT: INSERT INTO statistics ( url, deviceid, createdate, acces
sdate, percentage, playcounter, rating, uniqueid, deleted ) VALUES ( './The Band
/The Band - The Band - 09  Look Out Cleveland.flac', 3, 1191775117, 0, 74.5, 0,
0, '135162feb18d1d0bba7a2b3f61ccf499', 0 );

If I try re-scanning my collection I see things like:

amarok:    [CollectionDB] MYSQL QUERY FAILED: Incorrect key file for table './a
marok/statistics.MYI'; try to repair it
amarok: FAILED QUERY: UPDATE statistics SET deviceid = 3, url = './Hasil Adkins/
Hasil Adkins - What The Hell Was I Thinking - 04 You''re Gonna Miss Me.flac' WHE
RE uniqueid = '83c78a7485b998c52622a0dc0e30c7d4';

While MySQL is complaining with messages like:

071007 11:31:40 [ERROR] /usr/libexec/mysqld: Incorrect key file for table './ama
rok/statistics.MYI'; try to repair it

Since maintaining the statistics has been a priority for me, I'm willing to invest some effort to fix this, but I'm uncertain where to begin.  Can anyone provide any advice on saving my statistics or am I hosed?

Cheers,
Malcolm

Last edited by dangle_wtf on Tue Oct 09, 2007 10:14 pm, edited 1 time in total.
mtobias
Registered Member
Posts
2
Karma
0

Re: corrupted MySQL database

Tue Oct 09, 2007 1:19 pm
I managed to find the solution to my problem.  I simply had to go into MySQL and 'repair table statistics'.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]