Default collation in my.cnf [mysql]
Escuse the rambling, I am quite a bit frustrated. I love MySQL, but I believe the whole character set and collation part is an unholy mess. As long as you use ASCII (English) or UTF-8 you mostly ignore it and things don't bite you in the a$$, but otherwise...
My webapp keeps spewing out errors like this one: MySQL Error: 1267 (Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '=') when I compare a table.field with a @variable I previously set. Yes, I know I can SET NAMES, but I don't like to insert one more query in each and every webpage invocation. It makes for millions of unuseful queries to MySQL out of a server's workday.
So. This is a valid option in my.cnf:
[mysqld]
default-collation=latin1_general_ci
Is there an equivalent line which applies to [mysql]? I see I can set the default character set there, but how do I set the collation?
Also, where does one set the default collation for a PHP connection to the database?
On a more general note, is there a place where all options acceptable for my.cnf are listed?
Thank you in advance. I will sacrifice you the heart of my firstboth child, if needed.
Subject
Views
Written By
Posted
Default collation in my.cnf [mysql]
14112
September 12, 2006 07:14AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.