当前位置:网站首页>Different lower_case_table_names settings for server ('1') and data dictionary ('0') solution
Different lower_case_table_names settings for server ('1') and data dictionary ('0') solution
2022-07-30 05:55:00 【bluepad】
Problem Scenario
When using the Lowy framework, the database table cannot be found.The conclusion is that mysql is case sensitive.
lower_case_table_names parameter
The official original words, simply put, the default for unix is 0, the default for windows is 1, and the default for mac is 2.
0 is case-sensitive, 1 is insensitive, that is, Windows is case-insensitive by default.
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.
Problem Resolution
I have read a lot of information, all of which say that configuring lower_case_table_names=1 in the configuration file, restarting the service can solve the problem.
Later, after I checked the official mysql documentation, I found that this solution is only valid in mysql with versions lower than 5.6/5.7.
But it doesn't work under version 8.0, even how to do lower_case_table_names variable is not updated.
A new note added to the official mysql8.0 version
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.
Translation:
LOWER_CASE_TABLE_NAMES can only be configured when initializing the server.Disallow changing the LOWER_CASE_TABLE_NAMES setting after server initialization.
In other words, in version 8.0, your mysql has been initialized and does not support modifying the lower_case_table_names parameter!!
If you are on version 8, it is recommended that you reinstall directly.
Add lower_case_table_names=1 to my.cnf (maybe different names) file
You need to specify lower_case_table_names=1 parameter during initialization
This is the most reliable reinstallation tutorial I found: https://blog.csdn.net/qq_37598011/article/details/93489404
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- leetcode hot 100(刷题篇11)(231/235/237/238/292/557/240/36)offer/3/4/5
- 腾讯面试居然跟我扯了半小时的CountDownLatch
- Kyligence 出席华为全球智慧金融峰会,加速拓展全球市场
- MySQL基础(DDL、DML、DQL)
- [GLib] 什么是GType
- G巴士计数(Google Kickstart2014 Round D Problem B)(DAY 89)
- 互联网(软件)公司项目管理软件调研报告
- Internet (software) company project management software research report
- Docker-compose install mysql
- C语言中的基本库函数(qsort)
猜你喜欢
随机推荐
MySQL(4)
从想当亿万富翁到职场、创业、爱情、抑郁、学医学武,我的程序人生
MySQL - 函数及约束命令
C language implements highly secure game archives and reads files
成绩排序(华中科技大学考研机试题)(DAY 87)
给小白的 PostgreSQL 容器化部署教程(上)
Redis学习
MySql string splitting realizes the split function (field splitting, column switching, row switching)
互联网(软件)公司项目管理软件调研报告
Participate in open source, let programmers regain their blood and passion
破纪录者(Google Kickstart2020 Round D Problem A)
Go语学习笔记 - gorm使用 - 事务操作 Web框架Gin(十一)
如何使用FirewallD限制网络访问
[Mysql] CONVERT函数
It's time to have to learn English, give yourself multiple paths
2022年SQL大厂高频实战面试题(详细解析)
JVM之GC 调优基础知识(一)
Thymeleaf简介
RadonDB MySQL Kubernetes 2.2.0 发布!
质数(清华大学机试题)(DAY 86)









