Fix for TrackStat error 'Illegal mix of collations'

From Yggenyk
Jump to: navigation, search

SqueezeCenter is using the MySQL database.
It automatically installs the database when you install SqueezeCenter.
If your machine is correct configured for your local regional settings. It will create it's databases with your local collation order (like danish = utf8_danish_ci).
If you later on installs plugins (like TracStat), they might create tables in the database's default collation order.
This will normally be utf8_general_ci, and can cause error messages in Squeezecenters log like this:
[09-05-17 19:50:35.1285] Plugins::TrackStat::Statistics::Base::getTracksWeb (201) Database error: Illegal mix of collations (utf8_danish_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
To fix this modify the dafault collection order in this file:
C:\Documents and Settings\All Users\Application Data\SqueezeCenter\Cache\MySQL\slimserver\db.opt
or on Vista
C:\ProgramData\SqueezeCenter\Cache\MySQL\slimserver\db.opt
from utf8_general_ci to the codepage you have in SqueezeCenters other tables.
Then restart your machine so both the SqueezeCenter and the MySQL service is restartet.
The database tables can be examined with MySQL Administrator. SqueezeCenters database in on port 9092 and there is no username or password.

MySQL Administrator

A list of valid collations can be found here: http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html

id=siteTree