1 message in com.mysql.lists.win32Illegal mix of collations error
FromSent OnAttachments
Elena Korol12 Oct 2006 17:30 
Subject:Illegal mix of collations error
From:Elena Korol (eko@SMARTEQUIP.COM)
Date:10/12/2006 05:30:27 PM
List:com.mysql.lists.win32

Can someone please help me to figure out a correct combination of the character sets and collations for 5.0.23 Mysql server funning on XP? I have a previously working data xml import program that used to run just fine against older 4.0.14 Mysql server, but with the new mysql server installation I am getting the following error:

at java.awt.EventDispatchThread.run(EventDispatchThread.java:99) java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) an d (utf8_general_ci,COERCIBLE) for operation '=' at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2917)

the following variables are set on Mysql 5.0

mysql> show variables like "%char%"; +--------------------------+-------------------------------------+ | Variable_name | Value | +--------------------------+-------------------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | D:\mysql\share\charsets/ | +--------------------------+-------------------------------------+

The database that I am trying to update is created with --default-character-set=latin1 and data is imported with the same option. I see that character sets for connection can be altered via : >SET NAMES 'latin1' COLLATE 'latin1_swedish_ci';

Does it mean that our programmer has to modify the import routine and add these statements? Or some other "trick" on the database level will do?

My older server (4.0.14) did have the following variables:

character_set latin1 character_sets latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5

Thank you in advance, Elena K.