第一种方法:
要让mysql查询区分大小写,可以:

select * from some_table where binary str='abc'
select * from some_table where binary str='ABC'

第二方法:
在建表时时候加以标识

create table some_table(
   str char(20) binary
)