MySQL/Tweaks

From Omnia
Revision as of 20:54, 9 March 2016 by Kenneth (talk | contribs) (Created page with "[http://dev.mysql.com/doc/refman/5.0/en/name-case-sensitivity.html Identifier Case Sensitivity] How table and database names are stored on disk and used in MySQL is affected...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Identifier Case Sensitivity

How table and database names are stored on disk and used in MySQL is affected by the lower_case_table_names
system variable, which you can set when starting mysqld. lower_case_table_names can take the values shown
in the following table. On Unix, the default value of lower_case_table_names is 0. On Windows the default
value is 1. On Mac OS X, the default value is 2.

Value 	Meaning
0 	Table and database names are stored on disk using the lettercase specified in the CREATE TABLE
       or CREATE DATABASE statement. Name comparisons are case sensitive. Note that if you force this
       variable to 0 with --lower-case-table-names=0 on a case-insensitive filesystem and access MyISAM
       tablenames using different lettercases, index corruption may result.
1 	Table names are stored in lowercase on disk and name comparisons are not case sensitive. MySQL
       converts all table names to lowercase on storage and lookup. This behavior also applies to
       database names and table aliases.
2 	Table and database names are stored on disk using the lettercase specified in the CREATE TABLE
       or CREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons
       are not case sensitive. Note: This works only on filesystems that are not case sensitive! InnoDB
       table names are stored in lowercase, as for lower_case_table_names=1.