设置mysql表名大小写不敏感
来源:互联网 发布:中国联通网络解锁助手 编辑:程序博客网 时间:2024/04/27 16:38
在跨平台的程序设计中要注意到mysql的一些系统变量在windows和linux上的缺省值是不同的, 比如mysql表名称的大小写变量.
在windows上lower_case_table_names变量的缺省值为1; 在linux上为0; 在mac os上为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. 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.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. This works only on file systems that are not case sensitive! InnoDB
table names are stored in lowercase, as forlower_case_table_names=1
.如果想在linux环境中想设置表名为大小写不敏感, 那么可以通过如下的命令:
mysqld --SET-lower_case_table_names=1;
或者在mysql server的配置文件中添加配置项:
vi /etc/my.cnf
# The MySQL server[mysqld]set-variable=lower_case_table_names=1
iefreer
- 设置mysql表名大小写不敏感
- 设置mysql表名大小写不敏感
- MySql设置表名大小写不敏感
- mysql对表名大小写不敏感
- 配置mysql对表名大小写不敏感
- MYSQL如何设置大小写不敏感
- Mysql linux 表名大小写敏感解决方法
- mysql表名大小写敏感开启关闭
- MySQL(Linux上)能否设成对表名的大小写不敏感?
- mysql 数据的名,表名,段名 大小写敏感问题
- MYSQL大小写不敏感问题
- MySql大小写默认不敏感
- MySQL数据库大小写敏感设置
- MYSQL如何设置大小写敏感
- 教你如何在windows与linux系统中设置MySQL数据库名、表名大小写敏感
- linux下mysql表名大小写敏感问题
- MySQL的表名的大小写敏感问题
- linux中修改mysql表名大小写敏感
- linux下安装apache详解
- Crontab定时器使用
- 64位操作系统中注册COM组件的问题
- nodejs
- 从程序员到项目经理
- 设置mysql表名大小写不敏感
- windows2003服务---证书服务
- ios5 中文键盘高度变高覆盖现有ui问题的解决方案(获取键盘高度的方法)
- 【vim】vim的三种模式(command/input/last line)
- Whoosh使用手册(Index)(四)
- 如何保持iOS上键盘出现时输入框不被覆盖
- Django使用request和response对象
- Fckeditor上传相关
- GSM手机经典接入流程