The development process has been running on the local mysql Data. After the test is completed, connect to the LINUX Server database. The result is always an error and the table cannot be found! What I wonder about is that the server database is clearly built
The development process has been running on the local mysql Data. After the test is completed, connect to the LINUX Server database. The result is always an error and the table cannot be found! What I wonder about is that the server database is clearly built
The development process has been running on the local mysql Data. After the test is completed, connect to the LINUX Server database. The result is always an error and the table cannot be found! What I wonder about is that the table is clearly created in the server database. It is okay to test the connection and execute the query using the mysql console, but the program always reports an error!
So I started to repeat the test to find the problem. At first I thought it was the cause of driver or mysql version mismatch, But I re-wrote a JDBC connection to execute the query and found that there was no problem! It indicates that the driver is correct! So I suspected the connection pool problem. So I changed the connection in the program to a newly written JDBC connection and still encountered an error! At this time, I am going crazy! So I copied the SQL statement from the project and put it in the newly written JDBC program for execution. The same error finally occurred. The problem also surfaced a little bit! Because I have always been writing SQL statements in projects, I am used to using uppercase letters, but I usually use lower-case letters for temporary writing, so I can execute the temporary writing program, however, the SQL statement in the project cannot be executed, because mysql is case sensitive at the beginning, because it is correct on your machine. Later I checked the information and found that mysql is case sensitive by default in LINUX because of the operating system. Next we will change the mysql configuration so that it is case insensitive:
The case-insensitive MYSQL method is actually very simple:
1. Log On with ROOT and modify/etc/my. cnf
2. Add a row under [mysqld]: lower_case_table_names = 1
3. Restart the database.
I spent more than three hours on this small problem! NND, depressing! The problem is summarized here. I hope you will not take so many detours in the future!