mysql建立索引報錯:Specified key 'idx_repair_project_id_claim_nos' was too long; max key length is 767 byte
mysql建立索引報錯:Specified key ‘idx_repair_project_id_claim_nos’ was too long; max key length is 767 byte
今天在建立資料庫組合索引時報錯: mysql建立索引報錯:Specified key ‘idx_repair_project_id_claim_nos’ was too long; max key length is 767 byte 期初以為是索引名稱過長造成的,將索引名稱縮短還是報同樣的錯誤,最後通過查閱相關資料所知:mysql innodb儲存引擎預設支援的key最大長度為797bytes(MYISAM支援的最大長度為1000bytes),而我的資料庫字符集編碼採用的是utf8(一個字元為3位元組,utf8mp4一個字元為4位元組),所以支援的最大長度為797/3=255字元。 最後將組合索引改為單一索引就執行成功。
解決辦法: 1.將組合索引改為單一索引,前提是單一索引的字元長度小於等於255,如果單一索引字元長度還是大於255,則可以使用前置索引。 2.減小欄位的字元長度:varchar(255)->vrachar(100).
相關推薦
mysql建立索引報錯:Specified key 'idx_repair_project_id_claim_nos' was too long; max key length is 767 byte
mysql建立索引報錯:Specified key ‘idx_repair_project_id_claim_nos’ was too long; max key length is 767 byte 今天在建立資料庫組合索引時報錯: mysql建立索引報錯
hive報錯: Specified key was too long; max key length is 767 bytes
character 修改表 The value user 整理 query 道理 並且 DataNucleus.Datastore (Log4JLogger.java:error(115)) - An exception was thrown while adding/v
匯入sql檔案報錯:1071 Specified key was too long; max key length is 767 bytes
2018年05月22日 15:53:58 李長念 閱讀數:1503 一、背景 今天把伺服器的資料庫匯出了一份sql檔案,
[MySQL] 索引超出限制,導致#1071 - Specified key was too long; max key length is 767 bytes
錯誤復現 建立如下一張表: create table `mytable` ( id bigint primary key not null auto_increment, column1 varchar(255), column2 varchar(255) ) engine Inno
MySQL 問題分析:ERROR 1071 (42000) : Specified key was too long; max key length is 767 bytes
今天在MySQL 5.6版本的資料庫中修改InnoDB表字段長度時遇到了”ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes”錯誤,第一次遇到這個錯誤,遂花了點學習、研究過、
laravel報錯1071 Specified key was too long; max key length is 1000 bytes
編碼 apps rate func cep fff error boot code Laravel 默認使用utf8mb4字符編碼,而不是的utf8編碼。因此運行php artisan migrate會出現如下錯誤: [Illuminate\Database\Quer
laravel migrate時報錯:Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
今天在學習laravel的路由模型繫結時,在按照文件執行php artisan migrate時報錯。 In Connection.php line 664: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was
Spark連線Hive 建立表提示"Specified key was too long; max key length is 767 bytes"解決辦法
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDODataStoreException: An except
django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes');
ali iss xxxxx beat 字符串類型 參數設置 5.6 detail spa 在使用utf8mb4字符集的情況下,如果列存在索引,那麽varchar的最大長度是191 數據庫版本: 在使用utf8字符集的情況下,如果列存在索引,那麽varchar的最大長度是2
Specified key was too long; max key length is 1000 bytes問題解決
今天使用帆軟的報表平臺管理,進行外接資料庫配置,嘗試多次一直提示資料匯入失敗 java的報錯 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 1
ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
mysql> show variables like '%innodb_large_prefix%';+---------------------+-------+| Variable_name | Value |+---------------------+-------+| innodb
Laravel5 Syntax error or access violation: 1071 Specified key was too long; max key length is 1000
新建立了個laravel5框架,然後安裝laravel-admin並執行migration的時候出現瞭如下報錯問題 php artisan admin:install Migration table created successfully. In Connection.p
django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes')
tree 大於 val pos 做的 let cat div ble 環境介紹 Django (2.1) Python 3.5.5 mysqlclient (1.4.2.post1) Mysql 5.6.28 RHEL 7.3 在migrate時候報錯
【資料庫索引】mysql更新資料報錯:Duplicate entry 'XXX' for key 'XXX'
經查:資料庫表索引型別設定問題導致,unique:約束資料庫表中的每一條資料唯一。 補充: 1.UNIQUE(要求列唯一) 和 PRIMARY KEY(主鍵唯一) 約束均為列或列集合提供了唯一性的保證。 PRIMARY KEY (主鍵)擁有自動定義的 UNIQUE
MySQL 5.7 報錯:ERROR 1292 (22007): Truncated incorrect DOUBLE value: 'CR40020180611004'
在生產環境update一個語句報錯: ERROR 1292 (22007): Truncated incorrect DOUBLE value: 'CR40020180611004' 經過網路查詢是資料型別不一致導致的。 --查看錶的型別: mysql> desc sc_stockord
linux 系統中系統關機後,mysql啟動失敗報錯:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '
自己在阿里雲伺服器上安裝好執行環境後,mysql都是正常使用的,昨天強制關閉伺服器後,重新啟動伺服器,發現數據庫無法啟動報錯:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/va
MySQL 問題分析:ERROR 1071 : Specified key was too long;max
今天在MySQL 5.6版本的資料庫中修改InnoDB表字段長度時遇到了”ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes”錯誤,第一次遇到這個錯誤,遂花了點學
MySQL 8.0 報錯:Identifier name 'ix_xxx' is is too long
某日在測試庫中新加索引報錯: Identifier name 'ix_orgid_warehouseid_businessType_orderCreateTime_state_ordertype' is
mysql建立資料庫報錯You have an error in your SQL syntax; check the manual that corresponds to your MySQL se
在使用xshell遠端連線我的伺服器時想建立一個數據庫 結果執行不對,sql語句如下 mysql> create database 'wechatmall'; 結果出現mysql報錯,這個提示很明顯是sql語句有問題 You have an e
mysql-建立使用者報錯ERROR 1396 (HY000): Operation CREATE USER failed for 'XXXX'@'XXXX'
建立使用者: create user ‘test’@’%’ identified by ‘test’; 顯示ERROR 1396 (HY000): Operation CREATE USER fai