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 build a Vue3 desktop application

In this article, we will look at how to develop a...

Zabbix monitoring docker application configuration

The application of containers is becoming more an...

React Router V6 Updates

Table of contents ReactRouterV6 Changes 1. <Sw...

React Native scaffolding basic usage detailed explanation

Build the project Execute the command line in the...

Optimize the storage efficiency of BLOB and TEXT columns in InnoDB tables

First, let's introduce a few key points about...

Introduction to TypeScript basic types

Table of contents 1. Basic types 2. Object Type 2...

JavaScript to implement checkbox selection or cancellation

This article shares the specific code of JavaScri...

CSS3 uses transform to create a moving 2D clock

Now that we have finished the transform course, l...

How to use physics engine joints in CocosCreator

Table of contents mousejoint mouse joint distance...

How to change the system language of centos7 to simplified Chinese

illustrate When you install the system yourself, ...

Summary of 11 amazing JavaScript code refactoring best practices

Table of contents 1. Extracting functions 2. Merg...

Singleton design pattern in JavaScript

Table of contents 1. What is a design pattern? 2....