您好,登錄后才能下訂單哦!
lower_case_table_names 參數(shù)MySQL 庫(kù)表 大小寫,默認(rèn)為0
0 庫(kù)表敏感,區(qū)分大小寫,指定的大小寫保存文件
1 庫(kù)表不敏感,不區(qū)分大小寫,文件系統(tǒng)以小寫保存
2 使用Create語(yǔ)句指定的大小寫保存文件,但MySQL會(huì)將之轉(zhuǎn)化為小寫,啟動(dòng)的時(shí)候日志報(bào)警告
參數(shù)從0調(diào)為1
lower_case_table_names =0下操作庫(kù)表都敏感
mysql> create database wx;
Query OK, 1 row affected (0.01 sec)
mysql> create database WX;
Query OK, 1 row affected (0.00 sec)
mysql> use wx;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> create table wx(id int);
Query OK, 0 rows affected (0.01 sec)
mysql> create table WX(id int);
Query OK, 0 rows affected (0.01 sec)
調(diào)整參數(shù)lower_case_table_names =1
此時(shí):兩表都有表信息,現(xiàn)在雖然有兩庫(kù),但是在一庫(kù)中建立表,另一庫(kù)中也會(huì)出現(xiàn)表
mysql> use wx;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+--------------+
| Tables_in_wx |
+--------------+
| WX |
| wx |
+--------------+
2 rows in set (0.00 sec)
mysql> use WX;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+--------------+
| Tables_in_wx |
+--------------+
| WX |
| wx |
+--------------+
2 rows in set (0.00 sec)
參數(shù)lower_case_table_names =1下操作
mysql> create database ww;
Query OK, 1 row affected (0.01 sec)
mysql> create database WW;
ERROR 1007 (HY000): Can't create database 'ww'; database exists
mysql> use ww;
Database changed
mysql> create table ww(id int);
Query OK, 0 rows affected (0.01 sec)
mysql> create table WW(id int);
ERROR 1050 (42S01): Table 'ww' already exists
參數(shù)從0調(diào)到1,變化數(shù)據(jù)文件僅僅存放在小寫的庫(kù)中
[root@wxtest WX]# ls
db.opt
[root@wxtest wx]# ls
db.opt t1.frm t1.ibd wx.frm WX.frm wx.ibd WX.ibd
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。