Mysql table names in linux/centos are case-insensitive.
Scenario: Recently, the company switched the database from ORACLE to MYSQL. Since the table names in ORACLE are case insensitive, the problem of table names not found in mysql occurs, it is found that mysql table names in linux are case-sensitive, but some parameters can make them case-insensitive.
I. mysql Case details in linux:
1. Database names are case sensitive
2. The table name is case sensitive.
3. Table aliases are case sensitive.
4. Variable names are case sensitive
5. The column names are case-insensitive in all cases.
6. The column alias is case-insensitive in all cases.
2. Add parameters to make them case insensitive
1. Switch to the root user
$ Su-root
2. Modify the/etc/my. cof configuration file,
# Sed-I '/\ [mysqld \]/a \ lower_case_table_names = 1'/etc/my. cnf
Lower_case_table_names parameters:
0: Case Sensitive
1: case insensitive
3. Restart mysql
# Service mysqld restart
4. View mqsql Parameters
# Mysql-uroot-p
> Show variables like "% case % ";
+ ------------------------ + ------- +
| Variable_name | Value |
+ ------------------------ + ------- +
| Lower_case_file_system | OFF |
| Lower_case_table_names | 1 |
+ ------------------------ + ------- +
2 rows in set (0.00 sec)
Iii. Others
In Windows, MYSQL is always case-insensitive.