国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > 文庫 > 正文

lower_case_table_names參數設定處理Error Code

2024-09-07 22:12:36
字體:
來源:轉載
供稿:網友
        在 MariaDB 10.2.11 for windows中使用mysqldump導出DB,并導入Mysql 5.7.16 for Linux后,在程式執行時報錯:Error Code: 1146. Table XXX doesn't exist
 
       檢查程式代碼發現執行SQL :SELECT * FROM Base_User ... 報的錯,但檢查Mysql 5.7.16 for Linux 中table卻存在。
       嘗試把SQL中駝峰式表名(Base_User)改為全小寫表名SELECT * FROM base_user可以正常執行,原來是因為Mysql for Linux中默認大小敏感,而windows中默認大小寫不敏感。
 
      在my.cnf設置參數 lower_case_table_names 為1,并重啟mysql后大小寫不敏感
      [mysqld]
      lower_case_table_names=1
 
參考文檔:
lower_case_table_names
 
Property Value
Command-Line Format --lower-case-table-names[=#]
System Variable lower_case_table_names
Scope Global
Dynamic No
Type integer
Default 0
Minimum 0
Maximum 2
If set to 0, table names are stored as specified and comparisons are case-sensitive.
If set to 1, table names are stored in lowercase on disk and comparisons are not case sensitive.
If set to 2, table names are stored as given but compared in lowercase. This option also applies to database names and table aliases.
 
On Windows the default value is 1. On OS X, the default value is 2.
 
You should not set lower_case_table_names to 0 if you are running MySQL on a system where the data directory resides on a case-insensitive file system (such as on Windows or OS X).
It is an unsupported combination that could result in a hang condition when running an INSERT INTO ... SELECT ... FROM tbl_nameoperation with the wrong tbl_name letter case. With MyISAM, accessing table names using different letter cases could cause index corruption.
 
As of MySQL 5.7.9, an error message is printed and the server exits if you attempt to start the server with --lower_case_table_names=0 on a case-insensitive file system.
 
If you are using InnoDB tables, you should set this variable to 1 on all platforms to force names to be converted to lowercase.
 
The setting of this variable in MySQL 5.7 affects the behavior of replication filtering options with regard to case sensitivity.

(編輯:武林網)

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 老河口市| 建宁县| 呈贡县| 潍坊市| 哈尔滨市| 库伦旗| 江油市| 伊金霍洛旗| 利津县| 黎平县| 斗六市| 宁化县| 九江市| 泌阳县| 德兴市| 沛县| 石台县| 弋阳县| 宝坻区| 广南县| 都昌县| 冕宁县| 当涂县| 洛浦县| 张家界市| 清苑县| 寿光市| 柘荣县| 拉萨市| 丰顺县| 金沙县| 武功县| 于田县| 平顶山市| 鄂州市| 岱山县| 汕头市| 龙陵县| 鄂托克旗| 阳曲县| 阜阳市|