mysql設(shè)置不區(qū)分大小寫(xiě)
windows下
到安裝mysql的目錄,修改my.ini文件
在文件最后一行加上下面一句話
lower_case_table_names=1
說(shuō)明 0:區(qū)分大小寫(xiě),1:不區(qū)分大小寫(xiě)
效果如下
[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
內(nèi)容擴(kuò)展:
linux下
進(jìn)入etc下面
cd /etc/
編輯my.cnf文件
vi my.cnf
最后一行加上下面一句
lower_case_table_names=1
效果如下
# 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
重啟mysql:
systemctl restart mysqld
到此這篇關(guān)于mysql如何設(shè)置不區(qū)分大小寫(xiě)的文章就介紹到這了,更多相關(guān)mysql設(shè)置不區(qū)分大小寫(xiě)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
您可能感興趣的文章:- MySQL大小寫(xiě)敏感的注意事項(xiàng)
- MySQL 字符類型大小寫(xiě)敏感
- MySQL大小寫(xiě)敏感導(dǎo)致的問(wèn)題分析
- 解決MySQl查詢不區(qū)分大小寫(xiě)的方法講解
- MySQL數(shù)據(jù)庫(kù)大小寫(xiě)敏感的問(wèn)題
- mysql表名忽略大小寫(xiě)配置方法詳解
- Linux系統(tǒng)MySQL忘記密碼,重置密碼,忽略表名、列名大小寫(xiě)的方法
- 詳解MySQL查詢時(shí)區(qū)分字符串中字母大小寫(xiě)的方法
- MySql查詢不區(qū)分大小寫(xiě)解決方案(兩種)
- MySQL庫(kù)表名大小寫(xiě)的選擇