Home  >  Article  >  Database  >  MYSQL 对表明往区分大小写

MYSQL 对表明往区分大小写

WBOY
WBOYOriginal
2016-06-07 16:27:04945browse

MYSQL 对表明去区分大小写 今天郁闷死了,在LINUX下调一个程序老说找不到表,但是我明明是建了表的,在MYSQL的命令行下也可以查到,为什么程序就找不到表呢? ? 后来请教了一个老师才搞定,原来是LINUX下的MYSQL默认是要区分表名大小写的,哎,弄了那么旧,害

MYSQL 对表明去区分大小写

今天郁闷死了,在LINUX下调一个程序老说找不到表,但是我明明是建了表的,在MYSQL的命令行下也可以查到,为什么程序就找不到表呢?

?

  后来请教了一个老师才搞定,原来是LINUX下的MYSQL默认是要区分表名大小写的,哎,弄了那么旧,害死我了。

  让MYSQL不区分表名大小写的方法其实很简单:

  1.用ROOT登录,修改/etc/my.cnf

  2.在[mysqld]下加入一行:lower_case_table_names=1

  3.重新启动数据库即可

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn