Case Sensitivity lower_case_table_names parameter used in MySQL/ MariaDB
lower_case_table_names parameter is used to define the case sensitive of table name in MariaDB/MySQL
Name = Value | Description |
lower_case_table_names=0: | Names are case-sensitive. Default value for Linux database servers. Cannot be used natively on Windows or MacOS in a safe manner. |
lower_case_table_names=1: | Names are case-insensitive, and are automatically converted to all-lowercase internally and in all DB metadata. Default value for Windows database servers. Can be used on any OS. |
lower_case_table_names=2: | Names are case-insensitive, but retain their original casing internally and in DB metadata. Default value for MacOS database servers. Cannot be used natively on Linux. |
Best Solution:
For change the case sensitivity for the existing database. We need to first take a backup of the database and then create a database with the lower_case_table_names setting in my.cnf file and restart the MySQL/MariaDB services then load the data into the database again.