mysql如何設(shè)置不區(qū)分大小寫(xiě)
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-winx64datadir=F:/mysql-5.7.21-winx64/datamax_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 = 2Mdatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0
log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidlower_case_table_names=1
重啟mysql:
systemctl restart mysqld
到此這篇關(guān)于mysql如何設(shè)置不區(qū)分大小寫(xiě)的文章就介紹到這了,更多相關(guān)mysql設(shè)置不區(qū)分大小寫(xiě)內(nèi)容請(qǐng)搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!
相關(guān)文章:
1. Docker 安裝 MySQL 并實(shí)現(xiàn)遠(yuǎn)程連接教程2. 詳解sql server中數(shù)據(jù)庫(kù)快照工作原理3. Mysql優(yōu)化方法詳細(xì)介紹4. MyBatis 實(shí)現(xiàn)批量插入和刪除中雙層循環(huán)的寫(xiě)法案例5. 關(guān)于MySQL的ORDER BY排序詳解6. centos編譯安裝mariadb的詳細(xì)過(guò)程7. Mybatis 一級(jí)緩存與二級(jí)緩存的實(shí)現(xiàn)8. 為SQLite3提供一個(gè)ANSI到UTF8的互轉(zhuǎn)函數(shù)9. MySQL多表查詢的具體實(shí)例10. 盤(pán)點(diǎn)SqlServer 分頁(yè)方式和拉姆達(dá)表達(dá)式分頁(yè)
