問題描述
我想把小寫的表改成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.我不明白為什么它沒有改變.也許有人可以幫助我解決這個(gè)問題.是的,我在更改文件后重新啟動(dòng)了 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 文檔:
如果你正在運(yùn)行,你不應(yīng)該將lower_case_table_names設(shè)置為0數(shù)據(jù)目錄所在的系統(tǒng)上的 MySQL不區(qū)分大小寫的文件系統(tǒng)(例如在 Windows 或 macOS 上).它是一個(gè)不支持的組合可能導(dǎo)致掛起條件運(yùn)行 INSERT INTO ... SELECT ... FROM tbl_name 操作錯(cuò)誤的 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.
結(jié)論:您不能在 Windows 上這樣做.您必須使用 Unix 或 Linux 系統(tǒng)將 lower_case_table_names 設(shè)置為 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.
這篇關(guān)于Windows xampp 上的 Mysql 小寫表的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!