Home > Database > Mysql Tutorial > body text

有关于mysql 在linux下去分表名大小写的问题_MySQL

WBOY
Release: 2016-06-01 13:37:35
Original
836 people have browsed it

bitsCN.com

我做开发时候是用windows 的   所以没感觉 

今天部署自己做的一个yii 项目到linux的时候发现的一个问题,

yii 的rbac 的表找不到   报错如下

 

CDbCommand 无法执行 SQL 语句: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'si_manager.AuthAssignment' doesn't exist. The SQL statement executed was: SELECT * FROM `AuthAssignment` WHERE userid=:userid

 

但是我去看我linux的机器是有这个数据表的

image

仔细看提示,是大小写略微不同,之后手工执行出错的语句,同样报错,于是确定是大小写问题   

 

于是google   得知mysql在linux下表名是去分大小写的     只不过有配置改成不区分   非常简单

 

在/etc/my.cnf 里的[mysqld] 下面增加lower_case_table_names=1 这一句话即可

image

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!