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 小写表
基础教程推荐
- 是否可以执行按位分组功能? 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 在 SQL 中连接多个表 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- 将 SQL Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 无法解决整理冲突 2021-01-01
