Home > Database > Mysql Tutorial > mysql语句在linux下大小写敏感问题_MySQL

mysql语句在linux下大小写敏感问题_MySQL

WBOY
Release: 2016-06-01 13:33:01
Original
957 people have browsed it

bitsCN.com

mysql语句在linux下大小写敏感问题

 

mysql的sql语句在windows环境是默认lower_case_table_name=1(0大小写敏感,1为不区分大小写),是不区分大小写的.

 

但是在linux环境中,默认lower_case_table_name=0 是区分大小写的。

 

需要修改mysql的配置文件,步骤如下:

 

1、 # vi /etc/my.cnf

 

2、将lower_case_table_name=1 添加到[mysqld]下面,保存并退出:1. 按Esc键   2. 输入冒号“:wq”

 

3、然后重启mysql

 

   /etc/init.d/mysqld restart

 

如果出现 Warning:World-writable config file '/etc/my.cnf' is ignored

 

这仅仅是一个警告,并且可以被忽略。但下面是修复它的解决方案:

 

chmod 644 /etc/my.cnf       –644表示rw-r–r–

 

然后再重启服务就OK了

 

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template