mysql 大小写取消敏感设置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql 大小写取消敏感设置相关的知识,希望对你有一定的参考价值。

mysql 大小写取消敏感设置

#mysqld --SET-lower_case_table_names=1;


或者在mysql server的配置文件中添加配置项:

vi /etc/my.cnf

lower_case_table_names=1 


该变量值的详细定义如下:


ValueMeaning
0Table and database names are stored on disk using the lettercase specified in the CREATE TABLE orCREATE DATABASE statement. Name comparisons are case sensitive. You should not set this variable to 0 if you are running MySQL on a system that has case-insensitive file names (such as Windows or Mac OS X). If you force this variable to 0 with --lower-case-table-names=0 on a case-insensitive file system and access MyISAM tablenames using different lettercases, index corruption may result.
1Table 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.
2Table and database names are stored on disk using the lettercase specified in the CREATE TABLE orCREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons are not case sensitive. This works only on file systems that are not case sensitive! InnoDB table names are stored in lowercase, as forlower_case_table_names=1.


本文出自 “于昊(Pcdog)的博客” 博客,请务必保留此出处http://433266.blog.51cto.com/423266/1869824

以上是关于mysql 大小写取消敏感设置的主要内容,如果未能解决你的问题,请参考以下文章

MYSQL如何设置大小写敏感

mysql设置大小写敏感

MYSQL如何设置大小写敏感

Mysql设置大小写敏感

MySQL不区分大小写设置

MySQL不区分大小写设置