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

React Principles Explained

Table of contents 1. setState() Description 1.1 U...

Brief analysis of centos 7 mysql-8.0.19-1.el7.x86_64.rpm-bundle.tar

Baidu Cloud Disk: Link: https://pan.baidu.com/s/1...

Detailed explanation of how to use Teleport, a built-in component of Vue3

Table of contents 1. Teleport usage 2. Complete t...

JS ES new features template string

Table of contents 1. What is a template string? 2...

Vue form input binding v-model

Table of contents 1.v-model 2. Binding properties...

The difference between html, xhtml and xml

Development Trends: html (Hypertext Markup Languag...

How to use indexes to optimize MySQL ORDER BY statements

Create table & create index create table tbl1...

Detailed tutorial on installing phpMyAdmin on Ubuntu 18.04

We will install phpMyAdmin to work with Apache on...

How to upload projects to Code Cloud in Linux system

Create a new project test1 on Code Cloud Enter th...

JS implements the dragging and placeholder functions of elements

This blog post is about a difficulty encountered ...

How to use port 80 in Tomcat under Linux system

Application Scenario In many cases, we install so...

Solution to the conflict between Linux kernel and SVN versions

Phenomenon The system could compile the Linux sys...

Docker-compose image release process analysis of springboot project

Introduction The Docker-Compose project is an off...

MySQL slow query pt-query-digest analysis of slow query log

1. Introduction pt-query-digest is a tool for ana...