data too long for column
mysql命令列下輸入:
set sql_mode="";
然後執行剛剛的命令。
需要注意這個只在本次視窗生效,如果經常做這樣的操作應該修改配置檔案。
windows下為my.ini
linux下為my.cnf
上面的方法主要是關閉 sql_mode下的
STRICT_TRANS_TABLES:
在該模式下,如果一個值不能插入到一個事務表中,則中斷當前的操作,對非事務表不做任何限制
雖然執行上顯示的大多數都是成功,但是會發現
Records: 320 Duplicates: 0 Warnings: 15
我們再使用show warnings
看警告內容
會發現
Data truncated for column at row xxx
這個錯誤,其實就是插入的資料不合法造成的,
比如:亂碼,超出欄位長度,非法字元等, 我這裡的插入的資料因為是中文所以超出欄位長度。擴容之後問題完美解決。
根據報錯的row+數字,我們其實可以很快發現問題。如果不是1,那麼很大可能就是某一條資料太長的原因導致的。
如果是1,那可能是因為編碼之類 的問題。
相關文章
- mysql specified key was too long與Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- Error running ‘Application’Command line is too longErrorAPP
- Index column size too large. The maximum column size is 767 bytes.Index
- ORA-01489: result of string concatenation is too long
- 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- Specified key was too long; max key length is 1000 bytes
- 關於Argument list too long的問題
- [Err] 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- File name too long window和linux排查,解決Linux
- MySQL建立表失敗:Index column size too large. The maximum column size is 767 bytesMySqlIndex
- SAP:CX_SY_READ_SRC_LINE_TOO_LONG解決
- MySQL 5.7 到 5.6,出現 Index column size too large. The maximum column size is 767 bytesMySqlIndex
- MySQL資料庫index column size too large. the maximum column size is 767 bytes問題解決MySql資料庫Index
- git拉取程式碼報錯filename too long unable to create fileGit
- 偶遇ERROR 1071 (42000): Specified key was too long; max key length is 767 bytesError
- 解決 Specified key was too long ... 767 bytes 的本質問題
- 刪除大量檔案Argument list too long錯誤解決
- mysql5.7 資料匯入5.6 Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- Command line is too long. Shorten command line for JooLunMallApiApplication or also for Spring Boot default configuration?APIAPPSpring Boot
- 執行遷移檔案報錯 1071 Specified key was too long.
- 表結構遷移檔案Identifier name 'xxxxxx' is too long解決IDE
- ORA-12899: value too large for column ORG_NAME (actual: 145, maximum: 128)
- 【es】FATAL [circuit_breaking_exception] [parent] Data too large, data for [<http_request>] would beUIExceptionHTTP
- mysql Index column size too large 超過767錯誤解決方案(轉)MySqlIndex
- Excel為批註設定圖片背景 出現Bad Request - Request Too longExcel
- idea遇見Command line is too long. Shorten command line for Main or also for Application default configuration?IdeaAIAPP
- IntelliJ IDEA 執行專案的時候提示 Command line is too long 錯誤IntelliJIdea
- RMAN備份出現ORA-01801: date format is too long for internal buffer錯誤ORM
- [20210113]SP2-0232 Input too long. Must be less than 241 characters.txt
- idea在使用git clone 時出現Filename too long的報錯資訊IdeaGit
- C# The file is too long. This operation is currently limited to supporting files less than 2 gigabytes in size.C#MIT
- python json讀取資料:ValueError: Extra data: line 77 column 2 - line 16485 column 1 (char 1159 - 227243)PythonJSONError
- 【k8s】etcd叢集took too long to execute慢日誌告警問題分析K8S
- Spring Boot Intellij 執行應用的時候 Command line is too long. Shorten command line for 錯誤Spring BootIntelliJ
- IDEA命令列縮短器助你解決此問題:Command line is too long. Shorten command line...Idea命令列
- 【解決方法】Dubbo報錯Data length too large,調整payload大小解決
- 新年新歲,好運 long long
- long long的加法溢位情況