# Mysql collation Error

**URL:** <https://www.ruby-forum.com/t/mysql-collation-error/126772>\
**Category:** Rails\
**Created:** [January 22, 2008, 2:53am UTC](https://www.ruby-forum.com/t/mysql-collation-error/126772 "2008-01-22T02:53:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@sam](https://www.ruby-forum.com/u/sam)\
**Post date:** [January 22, 2008, 2:53am UTC](https://www.ruby-forum.com/t/mysql-collation-error/126772/1 "2008-01-22T02:53:58Z")

</div>

Hello,

I am having following mysql error.

ActiveRecord::StatementInvalid occurred in

> event#lg:  
> Mysql::Error: Illegal mix of collations  
> (latin1\_swedish\_ci,IMPLICIT) and (utf8\_general\_ci,COERCIBLE) for  
> operation ‘=’: select \* from locations where country = ‘HU’ and  
> geo\_state = ‘08’ and city = ‘Pázmánd’ and zip = ‘(null)’ and lat =  
> ‘47.283’ and lng = ‘18.666’ and metrocode = ‘0’ and areacode = ‘0’  
> and isp = ‘UPC Magyarorszag Kft.’ and organization = ‘UPC  
> Magyarorszag Kft.’ limit 1

I am using mysql server version 5.0.22.

mysql collation variables are set to:

collation\_connection  
latin1\_swedish\_ci

collation\_database  
utf8\_general\_ci

collation\_server  
utf8\_general\_ci

mysql character set are set to:

character\_set\_client  
latin1

character\_set\_connection  
latin1

character\_set\_database  
utf8

character\_set\_filesystem  
binary

character\_set\_results  
latin1

character\_set\_server  
utf8

character\_set\_system  
utf8

character\_sets\_dir  
/usr/share/mysql/charsets/

Any suggestion of comments will be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@sam](https://www.ruby-forum.com/u/sam)\
**Post date:** [January 27, 2008, 7:43pm UTC](https://www.ruby-forum.com/t/mysql-collation-error/126772/2 "2008-01-27T19:43:37Z")

</div>

Hi,

I’ve run into this same problem. Did you figure it out?

Thanks,  
Ger.

---

<div class="post-metadata">

**Author:** ![sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@sam](https://www.ruby-forum.com/u/sam)\
**Post date:** [January 28, 2008, 10:45am UTC](https://www.ruby-forum.com/t/mysql-collation-error/126772/3 "2008-01-28T10:45:32Z")

</div>

Hi again,

There were some international characters in the data that I was  
processing. Fortunately, I could just delete that specific data and  
get on with it.

Greetings,  
Ger.
