日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

MySQL 特殊参数

發布時間:2025/3/15 数据库 12 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MySQL 特殊参数 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

###開發規范

開發規范:關鍵字大寫,庫名字小寫,要有字符集
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
如果此參數寫作1的話表示強制小寫,
即使創建的數據庫名字為大寫也會強制修改為小寫

?

測試:修改/etc/my.cnf文件--->>>>>>>>lower_case_table_names 將該參數置為1

?

?后續操作見代碼塊

1 #重啟數據庫 2 [root@db01-sa ~]# /etc/init.d/mysqld restart 3 Shutting down MySQL..... SUCCESS! 4 Starting MySQL.... SUCCESS! 5 #登錄數據庫 6 [root@db01-sa ~]# mysql -uroot -p123 7 Warning: Using a password on the command line interface can be insecure. 8 Welcome to the MySQL monitor. Commands end with ; or \g. 9 Your MySQL connection id is 1 10 Server version: 5.6.38-log Source distribution 11 12 Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. 13 14 Oracle is a registered trademark of Oracle Corporation and/or its 15 affiliates. Other names may be trademarks of their respective 16 owners. 17 18 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 19 20 mysql> show databases; 21 +--------------------+ 22 | Database | 23 +--------------------+ 24 | information_schema | 25 | mysql | 26 | performance_schema | 27 | test | 28 +--------------------+ 29 4 rows in set (0.05 sec) 30 31 mysql> CREATE DATABASE OLDBOY CHARSET utf8; 32 Query OK, 1 row affected (0.39 sec) 33 34 mysql> show databases; 35 +--------------------+ 36 | Database | 37 +--------------------+ 38 | information_schema | 39 | mysql | 40 | oldboy | 41 | performance_schema | 42 | test | 43 +--------------------+ 44 5 rows in set (0.00 sec) View Code

?

###lower_case_table_names? ?end###

?

轉載于:https://www.cnblogs.com/nodchen/p/9210735.html

總結

以上是生活随笔為你收集整理的MySQL 特殊参数的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。