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
1.1 Introduction to iptables firewall Netfilter/I...
WeChat Mini Programs are becoming more and more p...
Table of contents 1. Principle of animation funct...
This article shares the installation and configur...
There are three ways to create an image: creating...
HTML has attempted to move away from presentation...
To achieve the plus sign effect shown below: To a...
Sublime Text 2 is a lightweight, simple, efficien...
Preface Recently, our company has configured mbp,...
The solution to the problem that Navicat cannot r...
Add inline styles to the required links: Copy code...
This article example shares the specific code of ...
Table of contents 1. Easy to read code 1. Unified...
Linux has been loved by more and more users. Why ...
This article shares the specific code for using j...