How to set mysql to case insensitive

How to set mysql to case insensitive

mysql set to case insensitive

Windows

Go to the directory where mysql is installed and modify the my.ini file

Add the following sentence to the last line of the file

lower_case_table_names=1

Description 0: case sensitive, 1: case insensitive

The effect is as follows

[mysqld]
port = 3306
basedir=F:/mysql-5.7.21-winx64
datadir=F:/mysql-5.7.21-winx64/data
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
default-character-set=utf8
lower_case_table_names=1

Content extension:

Under Linux

Enter etc

cd /etc/

Edit my.cnf file

vi my.cnf

Add the following sentence to the last line

lower_case_table_names=1

The effect is as follows

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
lower_case_table_names=1

Restart mysql:

systemctl restart mysqld

This is the end of this article about how to set MySQL case-insensitive. For more information about setting MySQL case-insensitive, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Notes on MySQL case sensitivity
  • MySQL character types are case sensitive
  • Analysis of problems caused by MySQL case sensitivity
  • How to solve the problem of case insensitivity in MySQL queries
  • MySQL database case sensitivity issue
  • Detailed explanation of MySQL table name case-insensitive configuration method
  • Linux system MySQL forgotten password, reset password, ignore the case of table and column names
  • How to distinguish uppercase and lowercase letters in strings when querying MySQL
  • MySql query case insensitive solution (two)
  • MySQL table name case selection

<<:  Detailed tutorial for installing ffmpeg under Linux

>>:  Eight examples of how Vue implements component communication

Recommend

How to recover files accidentally deleted by rm in Linux environment

Table of contents Preface Is there any hope after...

Vue imitates ElementUI's form example code

Implementation requirements The form imitating El...

How to install Nginx in a specified location in Centos system

How to install Nginx in a specified location in C...

Detailed explanation of the use of Vue.js render function

Vue recommends using templates to create your HTM...

Detailed tutorial on using the tomcat8-maven-plugin plugin in Maven

I searched a lot of articles online but didn'...

XHTML tutorial, a brief introduction to the basics of XHTML

<br />This article will briefly introduce yo...

A mobile adaptive web page effect solves the problem of small display page

For work needs, I need to make a mobile phone adap...

In-depth interpretation of /etc/fstab file in Linux system

Preface [root@localhost ~]# cat /etc/fstab # # /e...

CSS3 new layout: flex detailed explanation

Flex Basic Concepts Flex layout (flex is the abbr...

mysql method to recursively search for all child nodes of a menu node

background There is a requirement in the project ...

Implementation of CSS linear gradient concave rectangle transition effect

This article discusses the difficulties and ideas...

jQuery realizes dynamic particle effect

This article shares the specific code of jQuery t...

HTTPS Principles Explained

As the cost of building HTTPS websites decreases,...