問題描述
我想把小寫的表改成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 小寫表的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!