There is a project deployed to the server, the log is always prompted to find the table.
Originally Linux under MySQL default to table name is case-sensitive.
Workaround:
One, the specification code, the table name all uppercase
Second, modify the MySQL configuration, so that the table name is automatically converted to lowercase.
1. Log in with root, modify/ETC/MY.CNF
2. Add a line under [mysqld]: Lower_case_table_names=1
3. Restart the database
|
Explain |
0 |
Save the table name and database name on your hard disk using the uppercase and lowercase letters specified by the CREATE TABLE or CREATE DATABASE statement. The name comparison is case sensitive. On a case insensitive operating system such as Windows or Mac OS X we cannot set this parameter to 0 if--lowercase-table-names is coerced to 0 on case-insensitive file systems, and the MyISAM table name is accessed with a different case. May cause index corruption. |
1 |
Table names are saved in lowercase on the hard disk, and the name comparisons are not case sensitive. MySQL converts all table names to lowercase on the storage and lookup tables. This behavior is also appropriate for database names and table aliases. The value is the default value for Windows. |
2 |
The table name and database name are saved on the hard disk using the uppercase and lowercase letters specified by the CREATE TABLE or CREATE DATABASE statement, but MySQL converts them to lower case on the lookup table. Name comparisons are not case sensitive, that is, they are saved by case, and are compared in lowercase. Note: Applies only on file systems that are not case sensitive! InnoDB table names are saved in lowercase. |
MySQL is case-insensitive to table names by default under Linux