Installing MySQL on Linux defaults to the database's table case sensitivity. The modification is simple, as long as the one MySQL configuration file is available.
Mysql> Show tables;
+--------------------------------------+
| Tables_in_cddl |
+--------------------------------------+
| a1_equipment |
| A1_equipment_batch |
| Actionby |
| Actionitem |
| actionitemcomments |
| Actionitemdetail |
| Actionitemstatus |
| cal_cost_element |
| Cal_cost_element_stat |
| Cal_statistics |
| Changeduedate |
| Commisstionstartup |
| COPQ |
| Copq_category |
| Costbreakdown |
| daily_statistic |
| Dbstudy |
| Dccddlist |
| define_cost_element |
| djpmomsactivity |
| Drawing |
| Dsystem_user |
| dtproperties |
| duser_rights |
| EDCR |
| Edcr_2week |
| Edcr_status |
| Edcrchild |
| engineering_action_tracking |
| engineering_action_tracking_analysis |
| Fincostone |
| Fincostonerpt |
| Fincosttwo |
| Fincosttworpt |
| Fincostvariance |
| Fincostvariancerpt |
| Findataforchar |
| Finemployee |
| finemployee20120910 |
| Finemployeehist |
| Finemployeehistback |
| Finexportone |
| Finexporttwo |
| Finheadcountone |
| Finheadcountonerpt |
| Finheadcounttwo |
| Finheadcounttworpt |
| Finheadcountvariance |
| Finheadcountvariancerpt |
| finhistversioncomment |
| finposition |
| Finpositionhist |
| Finpositionhistback |
| finpositon20120910 |
| Flight |
| Hotel |
| Hrcontact |
| Hy_temp |
| Hyresponsetime |
| Impacteddrawingnumber |
| Jpmo_temp |
| Jpmoresponsetime |
| Meeting |
| Relatededcrnumber |
| Responsibleperson |
| Revisedscheduledate |
| Sm_temp |
| Smresponsetime |
| Sparepart |
| sysconstraints |
| syssegments |
| SystemParameter |
| Table_1_7_1 |
| table_1_7_2 |
| Table_1_7_3 |
| table_1_7_3a |
| table_1_7_3b |
| table_1_7_3c |
| table_appendix28 |
| Trend |
| Trenddetail |
| Visitor |
| Visitprogram |
| Vp_engdeliverablesreport |
+--------------------------------------+
All rows in Set (0.00 sec)
Mysql> Select COUNT (*) from TREND;
ERROR 1146 (42S02): Table ' Cddl. TREND ' doesn ' t exist
It can be seen from the above that the trend table exists, except that it is kept in the database in lowercase.
The way that MySQL does not differentiate between table name capitalization is actually simple:
1. Log in with root, modify/ETC/MY.CNF
2. Add a line under [mysqld]: Lower_case_table_names=1
3. Restart the database to
[Email protected] init.d]# VI/ETC/MY.CNF
[Mysqld]
Datadir=/var/lib/mysql
Socket=/var/lib/mysql/mysql.sock
Skip-grant-tables
Lower_case_table_names=1
[[Email protected] init.d]# service MySQL restart
Shutting down MySQL. [OK]
Starting MySQL ...... ..... .................... [OK]
Mysql> Select COUNT (*) from TREND;
+----------+
| COUNT (*) |
+----------+
| 19 |
+----------+
1 row in Set (0.00 sec)
Mysql> Select COUNT (*) from trend;
+----------+
| COUNT (*) |
+----------+
| 19 |
+----------+
1 row in Set (0.00 sec)
As can be seen from the above, it is not case-sensitive at this time.
How to set up a MySQL table that doesn't differentiate you from case to case