Home > Common Problem > body text

Is mysql case sensitive?

百草
Release: 2023-06-14 14:41:46
Original
12124 people have browsed it

Mysql is not case-sensitive by default. If the field is encoded in "*_bin", it will make mysql case-sensitive. Mysql under Linux defaults to case-sensitive table names, but in Table names under Windows are not case-sensitive.

Is mysql case sensitive?

The operating system of this tutorial: Windows 10 system, mysql version 8.0, Dell G3 computer.

1. Is MySQL case-sensitive by default? Use show Variables like '%table_names' to view the value of lower_case_table_names. 0 means distinction, 1 means no distinction.

Is mysql case sensitive?

#2. Mysql is not case-sensitive by default for varchar data, but if the field is encoded with "*_bin", mysql will be case-sensitive.

utf8_general_ci --not case sensitive

utf8_bin --case sensitive

Is mysql case sensitive?

3. Under Linux By default, MYSQL is case-sensitive in table names, but under Windows, table names are not case-sensitive.

The method to make MYSQL not case-sensitive in table names is actually very simple:

1. Log in with ROOT and modify /etc/my.cnf

2. Add a line under [mysqld]: lower_case_table_names=1

3. Restart the database That’s it

The above is the detailed content of Is mysql case sensitive?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template