Windows xampp 上的 Mysql 小写表 [英] Mysql lower case table on Windows xampp

查看:32
本文介绍了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 小写表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆