When migrating a windows database from a windows server test environment to a linux environment, some of the routines (aka stored procedures) would no longer work and returned the error 1146 table does not exist.

mysql

If you have this error, and the table or view does actually exist, it could be due to the possibility that the windows installation of MySQL seems to disregard upper case characters in table names. In my situation, an outside consultant had created the procedures and used upper and lower case names within the procedures. This led to a situation where the code worked on a windows server, and even the windows desktop I transferred the data to ran fine, but threw an error on the linux server.

To fix this situation, you can re-write all of the routines and views or you can tell the database engine to disregard the issue an be case-insensitive.

Add this code to the my.cnf file:

lower_case_table_names = 1

Place the code after the [mysql] block in the file. Don’t add it again if it’s already there.

Once you’ve modified the file, restart the server on Debian based linux systems with the following command.

service mysql restart

And now, Bob’s your uncle…

 

MySQL page regarding case sensitivity