最近发现遇到很多事,明明知道是自己不对的,还要求别人来做出改变,好奇怪~~

静静的写个小文档还是很好的~~~

mysql> show tables;
略
| t_txn_net                          |         ##这个表是存在的
| t_txn_pmc_breaker                  |
| t_txn_regedit                      |
| t_workday_pgm                      |
| t_workday_set                      |
+------------------------------------+
142 rows in set (0.00 sec)

mysql> select * from t_txn_neT;      ###查询表不存在
ERROR 1146 (42S02): Table 'upp.t_txn_neT' doesn't exist
mysql> 
mysql> 
mysql> show variables like 'lower_case_table_names';     ##区分大小写,这个没毛病
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_table_names | 0     |
+------------------------+-------+
1 row in set (0.00 sec)

DBA总是有办法的。
操作步骤如下:
1、关库
shutdown;
2、修改参数
vi my.cnf
lower_case_table_names  = 1  ##不区分大小写
3、启库
mysqld_safe --defaults-file=/etc/my.cnf &
4、再次查询,OK
mysql> select * from t_txn_neT;
Empty set (0.00 sec)
5、查看小写表名 value=1
mysql> show variables like 'lower%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | OFF   |
| lower_case_table_names | 1     |
+------------------------+-------+
2 rows in set (0.01 sec)