有关于mysql 在linux下去分表名大小写的问题_MySQL
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的机器是有这个数据表的
仔细看提示,是大小写略微不同,之后手工执行出错的语句,同样报错,于是确定是大小写问题
于是google 得知mysql在linux下表名是去分大小写的 只不过有配置改成不区分 非常简单
在/etc/my.cnf 里的[mysqld] 下面增加lower_case_table_names=1 这一句话即可

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The page is blank after PHP connects to MySQL, and the reason why die() function fails. When learning the connection between PHP and MySQL database, you often encounter some confusing things...

Causes and solutions for errors when using PECL to install extensions in Docker environment When using Docker environment, we often encounter some headaches...

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...

Solution to permission issues when viewing Python version in Linux terminal When you try to view Python version in Linux terminal, enter python...

Configure the apscheduler timing task as a service on macOS platform, if you want to configure the apscheduler timing task as a service, similar to ngin...

Regarding the problem of removing the Python interpreter that comes with Linux systems, many Linux distributions will preinstall the Python interpreter when installed, and it does not use the package manager...

Choice of Python Cross-platform desktop application development library Many Python developers want to develop desktop applications that can run on both Windows and Linux systems...

mysql...
