Home >Operation and Maintenance >Linux Operation and Maintenance >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%';
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;
2. Then add lower_case_table_names=1 under [mysqld] (as shown below)
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!