Why Changing lower_case_table_names in MySQL 8.0 Crashes Your Server
The article explains how the lower_case_table_names setting controls case sensitivity of MySQL identifiers, why MySQL 8.0 makes this setting immutable after initialization, and provides practical configuration advice to avoid server crashes.
Purpose of lower_case_table_names
The lower_case_table_names system variable determines how MySQL stores and compares table names. It can be set to three values:
0 – Store table names as created; comparisons are case‑sensitive.
1 – Store table names in lowercase; comparisons are case‑insensitive.
2 – Store table names as created but compare them in lowercase.
MySQL 8.0 Makes the Setting One‑Time Only
Starting with MySQL 8.0, the lower_case_table_names variable becomes immutable after the server is initialized. The official documentation states:
It is prohibited to start the server with a lower_case_table_names setting that is different from the setting used when the server was initialized. The restriction is necessary because collations used by various data dictionary table fields are determined by the setting defined when the server is initialized, and restarting the server with a different setting would introduce inconsistencies with respect to how identifiers are ordered and compared.
Consequently, you must configure the desired value before the first server start, typically by adding it to the MySQL option file.
Reference (MySQL 8.0): https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lower_case_table_names
Recommendation for Configuration
To avoid the crash scenario described (a friend’s database failed to restart after the parameter was changed), set lower_case_table_names in the configuration file before initializing the server. On Linux environments, setting it to 1 is recommended, which stores table names in lowercase on disk and makes name comparisons case‑insensitive.
MySQL 5.7 Does Not Enforce This Restriction
MySQL 5.7 allows changing the variable after initialization. See the documentation for details:
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_lower_case_table_names
In short: Changing lower_case_table_names in MySQL 8.0 will cause the server to fail; set it correctly before first start.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
dbaplus Community
Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
