当前位置:网站首页>Different lower_case_table_names settings for server (‘1‘) and data dictionary (‘0‘) 解决方案
Different lower_case_table_names settings for server (‘1‘) and data dictionary (‘0‘) 解决方案
2022-07-31 11:27:00 【m0_67392409】
问题情景
在使用洛伊框架的时候,数据库表找不到的问题。下结论是mysql区分大小写导致的问题。
lower_case_table_names 参数
官方原话,简单来说就是,unix默认是0,windows默认是1,mac是2。
0是区分大小写的,1是不区分的,也就是windows是默认不区分大小写的。
On Unix, the default value of lower_case_table_names is 0. On Windows, the default value is 1. On macOS, the default value is 2.
问题解决
我翻阅了大量资料,都是说在配置文件配置lower_case_table_names=1,重启服务可以解决问题。
后来经过我查阅mysql官方文档资料发现:该解决方案只能在5.6/5.7低版本的mysql中有效。
但是在8.0版本下是行不通的,就算怎么做lower_case_table_names变量也没有得到更新。
官方mysql8.0版本新增的一条说明
lower_case_table_names can only be configured when initializing the server. Changing the lower_case_table_names setting after the server is initialized is prohibited.
翻译:
LOWER_CASE_TABLE_NAMES只能在初始化服务器时配置。禁止在服务器初始化后更改LOWER_CASE_TABLE_NAMES设置。
也就是说在8.0版本,你的mysql已经初始化过就不支持修改lower_case_table_names参数了!!
如果你的是8版本这边建议你直接重装。
在my.cnf(可能名字不同)文件中添加lower_case_table_names=1
在初始化的时候需要指定lower_case_table_names=1参数
这是我找到最靠谱的重装教程:https://blog.csdn.net/qq_37598011/article/details/93489404
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
- 3.网页信息解析方法:Xpath与BeautifulSoup
- 分布式事务——分布式事务简介、分布式事务框架 Seata(AT模式、Tcc模式、Tcc Vs AT)、分布式事务—MQ
- cesium-Web网页优化进阶
- 内网渗透学习(四)域横向移动——SMB和WMI服务利用
- MySQL 的 limit 分页查询及性能问题
- Summary of several defragmentation schemes for MySQL (to solve the problem of not releasing space after deleting a large amount of data)
- mpu9150(driverack pa简明教程)
- Redis缓存面临的缓存击穿问题
- 5 个开源的 Rust Web 开发框架,你选择哪个?
- Docker build Mysql master-slave replication
猜你喜欢

【软件工程之美 - 专栏笔记】33 | 测试工具:为什么不应该通过QQ/微信/邮件报Bug?

SQLServer2019 installation (Windows)

多线程学习笔记-2.final关键字和不变性

5 个开源的 Rust Web 开发框架,你选择哪个?

MySQL row-level locks (row locks, adjacent key locks, gap locks)

使用内存映射加快PyTorch数据集的读取

面试、工作中常用sql大全(建议收藏备用)

Distributed Transactions - Introduction to Distributed Transactions, Distributed Transaction Framework Seata (AT Mode, Tcc Mode, Tcc Vs AT), Distributed Transactions - MQ

文件包含漏洞

Read through the interface to call the artifact RestTemplate
随机推荐
7 天找个 Go 工作,Gopher 要学的条件语句,循环语句 ,第3篇
新人学习小熊派华为iot介绍
R 语言data.frame 中的另一行中减去一行
redis-企业级使用
下课看着文档走回实验室,我重新拾起了遗忘的SQL运算符
502 bad gateway原因、解决方法
R语言做面板panelvar例子
WSL2安装.NET 6
2022/7/30
[Virtualization Ecological Platform] Platform Architecture Diagram & Ideas and Implementation Details
应用层基础 —— 认识URL
After class, watching the documentation and walking back to the lab, I picked up the forgotten SQL operators again
[Part 1 of Cloud Native Monitoring Series] A detailed explanation of Prometheus monitoring system
Can I find a Go job in 7 days?Learn Go with arrays and pointers
《云原生的本手、妙手和俗手》——2022全国新高考I卷作文
"JUC Concurrent Programming - Advanced" 06 - Immutability of Shared Models (Design of Immutable Classes | Use of Immutable Classes | Flyweight Pattern)
Use jOOQ to write vendor-agnostic SQL with JPA's native query or @Formula.
mysql automatically adds creation time and update time
MySQL row-level locks (row locks, adjacent key locks, gap locks)
SQL - Left join, Right join, Inner join