Specified key was too long; max key length is 767 bytes
2009-10-27 14:42
288 查看
database: MySQL 6
operation: 建表
sqlcode:
drop table if exists Atable ;
create table Atable (
id varchar(192) not null primary key,
name varchar(20) not null
)
error: Specified key was too long; max key length is 767 bytes
cause: UTF-8 requires up to 4 bytes per character in MySQL6.
test:
"
drop table if exists Atable ;
create table Atable (
id varchar(191) not null primary key,
name varchar(20) not null
)
" is ok
operation: 建表
sqlcode:
drop table if exists Atable ;
create table Atable (
id varchar(192) not null primary key,
name varchar(20) not null
)
error: Specified key was too long; max key length is 767 bytes
cause: UTF-8 requires up to 4 bytes per character in MySQL6.
test:
"
drop table if exists Atable ;
create table Atable (
id varchar(191) not null primary key,
name varchar(20) not null
)
" is ok
相关文章推荐
- Hive集成Mysql作为元数据时,提示错误:Specified key was too long; max key length is 767 bytes
- #1071 - Specified key was too long; max key length is 767 bytes
- Specified key was too long; max key length is 767 bytes
- hive中Specified key was too long; max key length is 767 bytes问题解决
- Specified key was too long;max key length is 767 bytes
- hive的Specified key was too long; max key length is 767 bytes问题解决
- ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
- 建立varchar字段的索引时,提示Specified key was too long; max key length is 767 bytes
- Specified key was too long; max key length is 767 bytes
- 关于MySQL字符集问题:Specified key was too long; max key length is 767 bytes
- 1071-specified-key-was-too-long-max-key-length-is-767-bytes
- MySQL----ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
- hive的Specified key was too long; max key length is 767 bytes问题解决
- MySQL: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
- mysql [Err] 1071 - Specified key was too long; max key length is 767 bytes
- 我从utf8改成utf8mb4 就报Specified key was too long; max key length is 767 bytes
- 【hadoop hive】hive建表报错:Specified key was too long; max key length is 767 bytes
- Hive部署安装时,Specified key was too long; max key length is 767 bytes
- MySQL:Specified key was too long; max key length is 767 bytes
- MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes