Mysql lower case table on Windows xampp(Windows xampp 上的 Mysql 小写表)
问题描述
我想把小写的表改成0,用大写写表名.我在 Windows 上使用 xampp.
I want to change the lower case table to 0 to write table names with uppercase. I use xampp on windows.
Mysql Workbench show me as configuration file C:\ProgramData\MySQL\MySQL Server 5.5\my.ini我加了一行
Mysql Workbench show me as configuration file C:\ProgramData\MySQL\MySQL Server 5.5\my.ini and i added the line
lower_case_table_names=0
在 xampp 中,我用同一行更改了 C:\xampp\mysql\bin\my.ini.但变量仍然显示 1.我不明白为什么它没有改变.也许有人可以帮助我解决这个问题.是的,我在更改文件后重新启动了 mysql.
In xampp i changed the C:\xampp\mysql\bin\my.ini with the same line. But still the variable show 1. I dont unterstand why it didnt changed. Maybe someone could help me with the problem. And yes i restart mysql after changing files.
ProgrammData 中的 my.ini
the my.ini in ProgrammData
[mysqld]
lower_case_table_names = 0
和xampp mysql中的my.ini
and the my.ini in xampp mysql
[mysqld]
lower_case_table_names = 0
# Set basedir to your installation path
basedir=c:/xampp/mysql
# Set datadir to the location of your data directory
datadir=c:/xampp/mysql/data
# Default: 128 MB
# New: 1024 MB
innodb_buffer_pool_size = 1024M
推荐答案
摘自 MySQL 文档:
如果你正在运行,你不应该将lower_case_table_names设置为0数据目录所在的系统上的 MySQL不区分大小写的文件系统(例如在 Windows 或 macOS 上).它是一个不支持的组合可能导致挂起条件运行 INSERT INTO ... SELECT ... FROM tbl_name 操作错误的 tbl_name 字母大小写.
You should not set lower_case_table_names to 0 if you are running MySQL on a system where the data directory resides on a case-insensitive file system (such as on Windows or macOS). It is an unsupported combination that could result in a hang condition when running an INSERT INTO ... SELECT ... FROM tbl_name operation with the wrong tbl_name lettercase.
结论:您不能在 Windows 上这样做.您必须使用 Unix 或 Linux 系统将 lower_case_table_names 设置为 0.
Conclusion: you can't do that on Windows. You will have to use a Unix or Linux system to set lower_case_table_names to 0.
这篇关于Windows xampp 上的 Mysql 小写表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Windows xampp 上的 Mysql 小写表


- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- SQL 临时表问题 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 更改自动增量起始编号? 2021-01-01