The SQL standard defines that identifiers are not case sensitive (unless double-quoted: "CamelCase"
). Your desire for CamelCase (mixed-case) names conflicts with the standard and you'd better learn to live with it. Or you start double-quoting your identifiers and never forget to do so.
Most RDBMS actually implement standard(-like) behavior. Even MySQL tries, lately, but it's very hard to break with established syntax rules.
Resources
The option character-set-database should not be configured in my.cnf
.
Please note what the MySQL Documentation says on character-set-database
:
The character set used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as character_set_server.
Footnote : This option is dynamic, but only the server should set this information. You should not set the value of this variable manually.
Even the Documentation says it is dynamic, it not supposed to be dynamically by any manual intervention against my.cnf
. If you look inside the database subfolder, you will find a file called db.opt
. EXAMPLE : When you run use dbname
in the mysql client, the file /var/lib/mysql/dbname/db.opt
is read in order to set character-set-specific database options contained in that file. For this reason, the variable has to be dynamic.
If you cannot access the database from the OS to see db.opt
, simply run this command:
SHOW CREATE DATABASE dbname;
on any database and you will see what db.opt
contains (or defaults if db.opt
is not there)
mysql> show create database mysql;
+----------+------------------------------------------------------------------+
| Database | Create Database |
+----------+------------------------------------------------------------------+
| mysql | CREATE DATABASE `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */ |
+----------+------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql>
In light of this, you should try setting character-set-server
in my.cnf
only (or at least remove character-set-database
from my.cnf
). Then, run service mysql restart
.
Give it a Try !!!
UPDATE #1
I sort of dealt with a question like this before : Why default character_set_server is latin1?
Looking back at my old link, I had an idea: I ran this:
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.6.10 |
+-----------+
1 row in set (0.00 sec)
mysql> select * from information_schema.collations where COLLATION_NAME like '%kor%';
+-----------------+--------------------+----+------------+-------------+---------+
| COLLATION_NAME | CHARACTER_SET_NAME | ID | IS_DEFAULT | IS_COMPILED | SORTLEN |
+-----------------+--------------------+----+------------+-------------+---------+
| euckr_korean_ci | euckr | 19 | Yes | Yes | 1 |
+-----------------+--------------------+----+------------+-------------+---------+
1 row in set (0.00 sec)
mysql>
You could set a Korean character set if need to.
UPDATE #2
You should leave wait_timeout and interactive_timeout out of the [client]
and [mysql]
groups.
Best Answer
Just altering the lower_case_table_names setting isn't enough. It needs to be done before you import your database(s).
The MySQL 5.1 documentation lists a procedure for moving between Windows and Linux/UNIX. This will ensure that your desired rules for enforcing case sensitivity are followed. Take a look and verify that you did these steps in the correct order: