Files and folders in Linux and Unix platforms in general are case sensitive making MySQL and MariaDB table names in these platforms to also be case sensitive. Windows however does not enforce case sensitivity for its folders and files causing MySQL and MariaDB table names in Windows to not be case-sensitive.

This means that a lowercase table named tablename is just the same as uppercase TABLENAME or TableName and using any of these will not make any difference in your query. This is due to the fact that MySQL and MariaDB stores and query database tables based on the filesystem's filename and folder.

You can use case-insensitive table name for MySQL and MariaDB in Linux or other Unix systems by enabling it in the configuration file.

Steps to enable case-insensitive table name in MySQL and MariaDB:

  1. Open MySQL or MariaDB configuration file using your favourite editor.
  2. Find and set lower_case_table_names option to 1.

    Add the line if it doesn't already exist.

  3. Restart MySQL or MariaDB service.
Discuss the article:

Comment anonymously. Login not required.