# # #开发规范
Development specification: keyword capitalization, library name lowercase, to have character set
CREATE databse oldboy CHARSET UTF8; # # #建议采用第一种
CREATE databse Oldboy CHARSET utf8mb4;
# # #lower_case_table_names begin###
Mysql> Show variables like '%lower% ';
+------------------------+-------+
| variable_name | Value |
+------------------------+-------+
| Lower_case_file_system | OFF |
| Lower_case_table_names | 0 |
+------------------------+-------+
2 rows in Set (0.00 sec)
#lower_case_table_names
If this parameter is written in 1 , it is forced lowercase,
Even if you create a database whose name is uppercase, it will be changed to lowercase
Test: Modify the/etc/my.cnf file--->>>>>>>>lower_case_table_names set this parameter to 1
See code block for subsequent operations
1 #重启数据库2 [[email protected] ~]#/etc/Init.d/mysqld Restart3 Shutting down MySQL ..... success! 4 starting MySQL .... success! 5 #登录数据库6 [[email protected] ~]# MySQL-Uroot-p1237Warning:using a password onThe command line interface can insecure.8Welcome toThe MySQL Monitor. CommandsEnd with;or\g.9Your MySQL Connection ID is 1TenServer version:5.6. --LogSource Distribution One ACopyright (c) -, ., Oracleand/orits affiliates. Allrights reserved. - -Oracle isA registered trademark ofOracle Corporationand/or its theAffiliates. Names May trademarks oftheir respective - owners. - -Type'Help ;' or '\h' forHelp. Type'\c' toClear the Currentinput statement. + -Mysql>show databases; + +--------------------+ A | Database | at +--------------------+ - |Information_schema| - |Mysql| - |Performance_schema| - |Test| - +--------------------+ in 4Rowsinch Set(0.05sec) - toMysql> CREATE DATABASEOldboy CHARSET UTF8; +Query OK,1Row affected (0.39sec) - theMysql>show databases; * +--------------------+ $ | Database |Panax Notoginseng +--------------------+ - |Information_schema| the |Mysql| + |Oldboy| A |Performance_schema| the |Test| + +--------------------+ - 5Rowsinch Set(0.00Sec
View Code
# # #lower_case_table_names end###
MySQL Special Parameters