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

[solved] Database issues - no collection

Tags: None
(comma "," separated)
poly_poly-man
Registered Member
Posts
6
Karma
0
OS
I've had this issue for several months - I've used amarok without the collection feature since then, but it's getting annoying.

Basically, amarok will scan through just fine, then when it gets to commiting the scan to database, it bails - progress bar skips from 75% to gone, and amarok --debug gives several lines along the lines of:
Code: Select all
amarok:      [ERROR!] Tried to perform insert on uninitialized MySQL
amarok:      [ERROR!] Tried to query an uninitialized m_db!
amarok:      Uh oh! For some reason MySQL thinks there isn't a max allowed size!

and others like that (these are not in order or necessarily in order - there are HUNDREDS of these messages). I'm left with an empty collection and database, ofc.

I'm currently on amarok 2.3.1 (but the issue has been around since the 2.2 betas, if not 2.1), and mysql (NOT EMBEDDED) 5.1.46 (but again, many other versions over this time, including several in the 5.0 branch). A while ago, I tried embedded mysql, but similar issues. I don't even want it, so don't suggest it (requires a downgrade to mysql 5.0). All on gentoo, btw.

I've tried mysql-5.1 on the same computer as mysql, 5.0 on a different machine (just in case being local was causing it), etc. I've MADE SURE several times that all the permissions are correct for the databases - all this is properly done in mysql, amarok just doesn't like it.

So, I really would like this fixed soon; simply asking you guys for help :)

Last edited by poly_poly-man on Wed Jul 14, 2010 9:50 pm, edited 1 time in total.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS

Re: Database issues - no collection

Wed Jul 14, 2010 11:59 am
Well, downgrading to 5.0 wouldn't make sense anyway, why do you assume that? Is your MySQL compiled with -fPIC? It should as this is required for Amarok.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
poly_poly-man
Registered Member
Posts
6
Karma
0
OS

Re: Database issues - no collection

Wed Jul 14, 2010 2:43 pm
Mamarok wrote:Well, downgrading to 5.0 wouldn't make sense anyway, why do you assume that? Is your MySQL compiled with -fPIC? It should as this is required for Amarok.

I figured that more versions I try with the better - just saying it doesn't work with either. Gentoo makes amarok depend on 5.0 if amarok is built with support for embedded mysql, so that's where that came from.

on amd64, mysql must be compiled with fPIC anyway, so yeah, it is.
jefferai
Moderator
Posts
52
Karma
0

Re: Database issues - no collection

Wed Jul 14, 2010 3:18 pm
You didn't say which of the errors repeats hundreds of times; I'll assume the former.

Anyways, all of this suggests that something is wrong with your MySQL -- either Amarok can't talk to it, or something is wrong with MySQL itself.

The reason I think this is that Amarok fetches the max_allowed_packet size from MySQL in order to optimize its inserts. As you can see from http://dev.mysql.com/doc/refman/5.1/en/ ... ables.html this is a system variable; as far as I'm aware it should always be available for queries. The fact that Amarok can't get this information back from MySQL indicates that it isn't talking to MySQL, period, which would explain the other issues.

I would ensure that your DB settings are correct -- make sure you can connect with the same -h host -u user and password settings on the command line. If that doesn't work, please run "amarok --debug" from the command line, let Amarok load, close it, and then run "amarok --debug --nofork" and paste the output.

Thanks.
poly_poly-man
Registered Member
Posts
6
Karma
0
OS

Re: Database issues - no collection

Wed Jul 14, 2010 4:17 pm
http://pastebin.ca/1900514 is a startup log - nothing special, just start and close (I can try to scan if you wish).

When I throw in bogus database information (including just a bad user or something), amarok is quick to tell me on startup, which is why I believe it's connecting... just failing at it.

I'm looking now into why that variable isn't exporting - I missed that error up until I posted it in the op.

EDIT: oh yeah, and I can connect to the database using the same settings as amarok has - and even modify the database and such (I always put it back to blank before letting amarok at it).
jefferai
Moderator
Posts
52
Karma
0

Re: Database issues - no collection

Wed Jul 14, 2010 9:08 pm
From the debug log, MySQL is throwing an error when Amarok tries to connect with the settings it has:

amarok: BEGIN: MySqlServerStorage::MySqlServerStorage()
amarok: Automatic reconnect successfully activated
amarok: connection to mysql failed
amarok: [ERROR!] Could not connect to mysql!
amarok: [ERROR!] "GREPME MySQL-server query failed! (1045) Access denied for user 'amarok'@'penguin.lan' (using password: NO) on na"

That "Access denied" bit comes straight from MySQL...
poly_poly-man
Registered Member
Posts
6
Karma
0
OS

Re: Database issues - no collection

Wed Jul 14, 2010 9:18 pm
jefferai wrote:From the debug log, MySQL is throwing an error when Amarok tries to connect with the settings it has:

amarok: BEGIN: MySqlServerStorage::MySqlServerStorage()
amarok: Automatic reconnect successfully activated
amarok: connection to mysql failed
amarok: [ERROR!] Could not connect to mysql!
amarok: [ERROR!] "GREPME MySQL-server query failed! (1045) Access denied for user 'amarok'@'penguin.lan' (using password: NO) on na"

That "Access denied" bit comes straight from MySQL...
did not spot that before, thanks.

WHY is is (using password: NO)? Since I gave it a password, shouldn't amarok be sending the password to mysql?
jefferai
Moderator
Posts
52
Karma
0

Re: Database issues - no collection

Wed Jul 14, 2010 9:33 pm
That's a good question. Stupid, off-the-cuff suggestion: try re-entering your password in the field?

Maybe somehow it was lost and you're seeing ************ but nothing is actually behind it.

Amarok connects using MySQL's C API, so it *always* uses the configured password...which is another way of me saying that, if re-entering your password doesn't work, I don't currently have any idea. So try that :-)
poly_poly-man
Registered Member
Posts
6
Karma
0
OS

Re: Database issues - no collection

Wed Jul 14, 2010 9:38 pm
re-entered and.... nothing.

I'm going to take a look at the code a bit... dunno why #1, this is an issue, and #2, this isn't an issue for more people...
poly_poly-man
Registered Member
Posts
6
Karma
0
OS
ah - solved it!

I edited ~/.kde4/share/config/amarokrc - found the database info, added Password=password under it (no mention of Password at all there), and all of a sudden it works!

dunno why it couldn't do this itself, though... oh well.
jefferai
Moderator
Posts
52
Karma
0
I'm not sure why that would be missing...it's really strange. But I'm super glad it's working again for you!


Bookmarks



Who is online

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