I have a MySQL database (running on Ubunutu) with whole bunch of tables with names in camelcase. For example, when I call show tables;
I get an output like
+-----------------------------------+
| Tables_in_[schema] |
+-----------------------------------+
| tabHelloWorld |
| tabUserAccounts |
| tabHistory |
+-----------------------------------+
However, when I'm trying to query a table, e.g., SELECT COUNT(*) FROM tabHistory
, I get the error
ERROR 1146 (42S02): Table 'schema.tabhistory' doesn't exist
Note the table name in all lowercase. The query SELECT COUNT(*) FROM tabhistory
returns the same error.
I assume it has something to with the variable lower_case_table_names
. It's currently set to 1, where I assumed that MySQL is not considering the case of table names. If I set lower_case_table_names = 0
the query with FROM tabHistory
is working. The problem is that the MySQL server is running other databases in turn are no longer accessible if I make that change.
How can I access my tables now?