Hi,

In my.cnf, I have:
[mysql]
default-character-set=utf8

When I connect via mysql client and try to run a query which has a
"CONCAT" string function, it works fine and I get the proper output.
Example: SELECT CONCAT ('a', ' - ', 'b')  = a-b

Now, I am trying to do make this work via Java and:
I use this JDBC Driver: mysql-connector-java-3.0.10-stable-bin.jar
Conn. String: 
jdbc:mysql://localhost:10000/db1?useUnicode=true&characterEncoding=utf8

I get the same error as I would have without the above
"default-character-set=utf8", i.e:
ERROR 1270 (HY000): Illegal mix of collations
(utf8_general_ci,IMPLICIT), (latin1_swedish_ci,COERCIBLE),
(utf8_general_ci,IMPLICIT) for operation 'concat'

How do I fix this, so that even the Java Client understands to use the
utf8 character set and I don't have to put the _utf8 in my sql
statement?

Appreciate your help.

thanks,
Ramesh

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to