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 table named tablename is just the same as TableName and using any of these 2 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 following these steps:

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

    Add the line if it doesn't already exist.

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

Share your thoughts, suggest corrections or just say Hi. Login not required.

Share!