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 1000 bytes
总结了下出错的原因:
1.DB engine 是MyIsAm
2.字符集是 utf8 ,1个utf8=3bytes
3.最后就是 (100+255)*3>1000 所以报错
SHOW ENGINES
查了下解决方案有:修改DB engine 至 innodb;更改字符集;减小字段长度
我采用的解决方案是修改DB engine为innodb
修改mysql配置文件,my.ini下面部分
default-storage-engine=INNODB
重启mysql
再次配置外接数据库,数据库数据导入成功
Specified key was too long; max key length is 1000 bytes问题解决的更多相关文章
- 数据库操作提示:Specified key was too long; max key length is 767 bytes
操作重现: 法1:新建连接——>新建数据库——>右键数据库导入脚本——>提示:Specified key was too long; max key length is 767 by ...
- Mysql Specified key was too long; max key length is 767 bytes
今天导入一个数据库时,看到以下报错信息: Specified key was too bytes 直译就是索引键太长,最大为767字节. 查看sql库表文件,发现有一列定义如下: 列 名:cont ...
- Specified key was too long; max key length is 767 bytes mysql
Specified key was too long; max key length is 767 bytes 说明: 执行当前 Web 请求期间,出现未经处理的异常.请检查堆栈跟踪信息,以了解有关该 ...
- Using innodb_large_prefix to avoid ERROR #1071,Specified key was too long; max key length is 1000 bytes
Using innodb_large_prefix to avoid ERROR 1071 单列索引限制上面有提到单列索引限制767,起因是256×3-1.这个3是字符最大占用空间(ut ...
- EF MySQL 提示 Specified key was too long; max key length is 767 bytes错误
在用EF的CodeFirst操作MySql时,提示 Specified key was too long; max key length is 767 bytes错误,但数据库和表也建成功了.有高人知 ...
- Specified key was too long; max key length is 767 b
alter table - engine=innodb,row_format=dynamic; Specified key was too long; max key length is 767 b
- MySQL错误“Specified key was too long; max key length is 1000 bytes”的解决办法
MySQL错误"Specified key was too long; max key length is 1000 bytes"的解决办法 经过查询才知道,是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 le ...
- Specified key was too long; max key length is 767 bytes解决方案
问题描述: 1. 使用spark sql处理数据逻辑,逻辑处理后使用 df.write.mode(saveMode).jdbc(url, tableName, connectionPropertie ...
随机推荐
- java获取上周任意一天的日期
/** * 获取上周周几的日期,默认一周从周一开始 * @param dayOfWeek * @param weekOffset * @return */ public static Date get ...
- Using the SAMA5D2-compatible ADC device
Introduction Kernel Software triggers Unsigned single-ended channel conversion Setup Test procedure ...
- java IO【转】
Java 流在处理上分为字符流和字节流.字符流处理的单元为 2 个字节的 Unicode 字符,分别操作字符.字符数组或字符串,而字节流处理单元为 1 个字节,操作字节和字节数组. Java 内用 U ...
- Office/Access 2013 扩展支持xbase/DBF 文件
最新的Access 2013 安装后,已经不能对dbf文件进行链接读取了,Access 2010以前的版本都可以,如果以前的项目用了Access链接大量的dbf文件的话, 升级Access 2013后 ...
- cv_bridge中的编码模式与实现
image_encodings.cpp文件是关于图像编码模式的源文件,其中规定了RGB的图像以及深度图的编码模式 该编码文件image_encodings.cpp所依赖的头文件图 命令空间 sens ...
- 一些有用的js插件
getfuelux.com 一系列插件合集 Ion.RangeSlider 超级牛的范围选择控件 Ion.CheckRadio Ion.Tabs Ion.Calendar Ion.ImageSlid ...
- android 代码混淆模板
#指定代码的压缩级别 -optimizationpasses #包明不混合大小写 -dontusemixedcaseclassnames #不去忽略非公共的库类 -dontskipnonpublicl ...
- Spring,hibernate,struts的面试笔试题(含答案)
Hibernate工作原理及为什么要用? 原理: 1.读取并解析配置文件 2.读取并解析映射信息,创建SessionFactory 3.打开Sesssion 4.创建事务Transation 5.持久 ...
- Python 类的初见
#定义一个Python类 class Cat: #self关键字相当于c++类中的this指针 def eat(self): print("i am eating .") def ...
- Patterns for Asynchronous MVVM Applications: Commands
Stephen Cleary Download the Code Sample This is the second article in a series on combining async an ...