This means that database and table names are case insensitive in Windows and are case-sensitive in most types of Unix systems. A special case is Mac OS X, when the default hfs+ file system is used. However, Mac OS X also supports UFS volumes, which are case-sensitive in Mac OS X as they are on any Unix. View Chapter 1.8.3 MySQL extensions to ANSI SQL92.
Note: Although database and table names are not case-sensitive in Windows, you should not use different capitalization in the same query to refer to a given database and table. The following query will not work because it references a table in my_table and my_table:
Copy Code code as follows:
Mysql> SELECT * from my_table WHERE my_table.col=1;
The name of the column and the alias of the column are ignored in all cases.
The alias of the table is case-sensitive. The following query will not work because it refers to aliases with A and a:
Mysql> SELECT col_name from Tbl_name as a WHERE a.col_name = 1 OR a.col_name = 2;
If you have difficulty remembering the letter size of your database and table names, it is recommended that you use a consistent convention, such as always creating databases and tables in lowercase letters.
Another way to avoid this problem is to start mysqld with the-o lower_case_table_names=1 parameter. By default, this option is 1 in Windows and 0 in Unix.
If Lower_case_table_names is 1, MySQL converts all table names to lowercase when they are stored and found. (Starting with MySQL 4.0.2, this option also applies to database names.) Note that when you change this option, you must first convert the old table name to lowercase before starting mysqld.
$ pwd
/data1/etl/aiinsight/scheduleserver/mysql/support-files
$./mysql.server Stop
$ pwd
/data1/etl/aiinsight/scheduleserver/mysql/bin
./mysqld_safe--lower_case_table_names
Method 2: Modify the MY.CNF configuration file
Join under [mysqld]
Lower_case_table_names=1