91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

lower_case_table_names參數設置解決Error Code: 1146. Table doesn't exist?

發布時間:2020-08-10 17:32:09 來源:ITPUB博客 閱讀:417 作者:guocun09 欄目:MySQL數據庫
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.

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

麻阳| 蓬溪县| 自贡市| 城市| 科尔| 上栗县| 乌鲁木齐县| 大兴区| 太白县| 鄱阳县| 元谋县| 繁峙县| 淅川县| 水富县| 鸡泽县| 延吉市| 托里县| 广西| 巴青县| 尚义县| 宝坻区| 阳原县| 朝阳区| 紫阳县| 雷州市| 宜黄县| 长子县| 托克托县| 饶平县| 普安县| 南充市| 乌拉特后旗| 彭州市| 长春市| 兴安盟| 娱乐| 咸丰县| 永吉县| 梅州市| 翁牛特旗| 开鲁县|