mysql在做字串比較時(比如密碼),發現大小寫是不區分的。
這與字段的編碼有關。
create
table
`vpromanage`.`user_info` (
`username`
char(20
) character
setutf8 collate utf8_bin
notnull
,`password`
char(20
) character
setutf8 collate utf8_bin
notnull
,`usertype` enum(
'general',
'advanced',
'admin')
notnull
,primary
key(`username`),
key`fk_uertype` (`usertype`)
) engine
=innodb
default
charset
=utf8;
collate 編碼 帶 "_bin"的是區分字元大小寫的。
mysql限制大小寫 mysql對大小寫的限制問題
今天研發人員問我,mysql對大小寫有限制嗎?我想都沒想,說沒限制。過了一會兒,研發人員告訴我說linux下是有限制的。我頓時有種打自己臉的感覺。對於自己不確定的問題,一定得想清楚,查明白了再說。在windows和mac os中,lower case tables name的預設值是1.如果只是在乙...
mysql 區分大小寫 大小寫敏感 配置
linux下mysql預設區分大小寫 windows下mysql預設不區分大小寫 檢視是否區分大小寫 lower case table names引數詳解 lower case table names 0 其中 0 區分大小寫,1 不區分大小寫 mysql在linux下資料庫名 表名 列名 別名大小...
mysql 小寫 MySQL大小寫小結
小結 1.資料庫名大小寫敏感,不可引數調配 2.表名大小寫敏感 可引數調配lower case table names 表別名敏感大小寫 3.列名和列的別名不敏感大小寫 4.變數名嚴格敏感大小寫,不可引數調配 5.執行目錄大小寫敏感,可引數調配 lower case file system 6.wi...