1 Cause After the project migrated the database and restarted, an error message was displayed saying "T_AAA table does not exist", but the table can be seen in the database and has data 2 Problem AnalysisReinstall the system and database to confirm that the system and database are clean. Eliminate the system and database as the cause. Use the same method to restore the data backup two days ago and one day ago. The project still cannot be started. Eliminate the cause of the data content. Use mysqldump and export SQL files to restore the data one day ago. The project still cannot be started. Eliminate the cause of the recovery method. The above methods are basically participated by operation and maintenance personnel. After the technical director participated in observing the project error, he suddenly found that it was a problem with the upper and lower case of the table name. The cause was finally determined through testing: 3 Solutions
4 ConclusionFor MySQL 8.0 and above, the lower-case-table-names parameter can only be set during initialization, and cannot be achieved by modifying my.cnf (adding configuration to my.cnf will result in an error) To initialize the database, you do not need to uninstall the entire MySQL and reinstall it. You only need to use the mysqld command. The user group of base_dir should be mysql. The command under Linux is: chown -R mysql.mysql MySQL data path (i.e. base_dir) Recursively create directories under Linux mkdir -p mysql/lib/mysql-files MySQL Reinitialization mysqld -initialize --lower-case-table-names=1 For MySQL 8.0 and above, you need to create a user first and then grant permissions create user 'test'@'%' identified by 'test'; -- with option can grant permissions to other users grant all privileges on test.* to 'test'@'%' with option; This is the end of this article about the pitfalls of recording lower_case_table_names in MySQL. For more relevant MySQL lower_case_table_names content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Pure CSS header fixed implementation code
>>: Analyze the difference between querySelector and getElementById methods in JavaScript
Table of contents Overview Code Implementation Si...
I will not introduce what CUDA is, but will direc...
This article shares the detailed steps of install...
1. Download 2. Decompression 3. Add the path envi...
1. Requirements description For a certain element...
Experimental environment: MYSQL 5.7.22 Enable bin...
See the effect first Implementation Code <div ...
1. Introduction The location instruction is the c...
I always thought that Docker had no IP address. I...
Table of contents 1. Basic storage of files and d...
The installation tutorial of mysql 8.0.11 winx64 ...
Table of contents 1. Commonjs exports and require...
After IntelliJ IDEA deploys a Javaweb project usi...
The first line of a Docker image starts with an i...
Preface JSON is a lightweight data exchange forma...