Databases 4 min read

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.

dbaplus Community
dbaplus Community
dbaplus Community
Why Changing lower_case_table_names in MySQL 8.0 Crashes Your Server

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.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Configurationmysqllower_case_table_namesMySQL8
dbaplus Community
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.