Home >Operation and Maintenance >Linux Operation and Maintenance >How to set mysql to be case-insensitive in linux

How to set mysql to be case-insensitive in linux

王林
王林Original
2020-01-11 14:30:054238browse

How to set mysql to be case-insensitive in linux

1. Use the command to check whether mysql is case-sensitive

show variables like '%case_table%';

How to set mysql to be case-insensitive in linux

lower_case_table_names=1( The description is not case-sensitive)

lower_case_table_names=0 (As shown in the picture above, 0 indicates that it is case-sensitive)

(Free video tutorial sharing: linux video tutorial)

2. Modify the value of lower_case_table_names to 1

Modify the /etc/my.cnf file through the vim editor, and add lower_case_table_names=1 under [mysqld] ( As shown below)

1. Enter the my.cnf file

vim /etc/my.cnf;

How to set mysql to be case-insensitive in linux

2. Then add lower_case_table_names=1 under [mysqld] (as shown below)

How to set mysql to be case-insensitive in linux

Exit and save.

3. Restart the mysql service

service mysqld restart;

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of How to set mysql to be case-insensitive in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn