高版本mysql向低版本(5.7以下)导入sql时可能会发生此问题

开启索引最大长度

SET GLOBAL INNODB_LARGE_PREFIX = ON;

将表改为动态表
SET GLOBAL innodb_file_format = BARRACUDA;

设值表的行记录格式为Dynamic

创建表时CREATE TABLE `users` (
    `username` varchar(50) NOT NULL,
  `password` varchar(500) NOT NULL,
   `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY (`username`) USING BTREE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

mysql 错误解决大法 Specified key was too long; max key length is 767 bytes的更多相关文章

  1. 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的字段设置 ...

  2. 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错误,但数据库和表也建成功了.有高人知 ...

  3. Hive集成Mysql作为元数据时,提示错误:Specified key was too long; max key length is 767 bytes

    在进行Hive集成Mysql作为元数据过程中.做全然部安装配置工作后.进入到hive模式,运行show databases.运行正常,接着运行show tables:时却报错. 关键错误信息例如以下: ...

  4. 关于MySQL字符集问题:Specified key was too long; max key length is 767 bytes

    [文章来源]http://blog.csdn.net/cindy9902/article/details/6215769 MySQL: ERROR 1071 (42000): Specified ke ...

  5. OpenStack安装keyston 错误BError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max key length is 767 bytes‘) [SQL: u‘\nCREATE TABLE migrate_ver

    折腾了两天的错误,BError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max key length is ...

  6. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes

    hive 安装完成后创建表的时候出现错误 NestedThrowablesStackTrace:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExce ...

  7. Specified key was too long; max key length is 767 bytes mysql

    Specified key was too long; max key length is 767 bytes 说明: 执行当前 Web 请求期间,出现未经处理的异常.请检查堆栈跟踪信息,以了解有关该 ...

  8. hive mysql元数据,报错 Specified key was too long; max key length is 767 bytes

    Specified key was too long; max key length is 767 bytes 此错误为hive 元数据mysql 字符集编码问题 如 show create tabl ...

  9. Mysql: Specified key was too long; max key length is 1000 bytes

    在使用quartz持久化的时候,笔者使用的mysql,为了以后方便迁移数据,笔者的Mysql默认引擎MyISAM 于是顺理成章的执行了quartz-2.2.3\docs\dbTables\tables ...

  10. laravel错误1071 Specified key was too long; max key length is 1000 bytes

    Laravel 5.5 环境,php artisan migrate 之后,出现错误如题. 检查了一下,代码是这样的: $table->increments('id'); $table-> ...

随机推荐

  1. K8S之prometheus-operator监控

    prometheus-operator 1. Prometheus Operator介绍 介绍文章:http://t.zoukankan.com/twobrother-p-11164391.html ...

  2. mindxdl--common--errs.go

    // Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.// Package common the error ...

  3. go语言单元测试:go语言用gomonkey为测试函数或方法打桩

    一,安装用到的库1,gomonkey代码的地址: https://github.com/agiledragon/gomonkey 2,从命令行安装gomonkey go get -u github.c ...

  4. i春秋Hello World

    打开只有一句hello world,直接查看源码,发现一个flag.xmas.js文件 试试直接访问http://106.75.72.168:9999/flag.xmas.js  http://106 ...

  5. matplotlib详细教学

    Matplotlib初相识 认识matplotlib Matplotlib是一个Python 2D绘图库,能够以多种硬拷贝格式和跨平台的交互式环境生成出版物质量的图形,用来绘制各种静态,动态,交互式的 ...

  6. 【每日一题】【小根堆&边出队边入队后续节点&注意判空】23. 合并K个升序链表-211128/220213

    给你一个链表数组,每个链表都已经按升序排列. 请你将所有链表合并到一个升序链表中,返回合并后的链表. 答案1(参数是数组): /** * Definition for singly-linked li ...

  7. linux安装Erlang和Rabbitmq以及安装问题解决

    安装环境: Alibaba Cloud Linux 安装erlang命令: rpm --import https://packages.erlang-solutions.com/rpm/erlang_ ...

  8. python基础(数据库、可视化软件Navicat、python操作MySQL)

    多表查询的两种方法 数据准备: 建表 create table dep( id int primary key auto_increment, name varchar(20) ); create t ...

  9. web项目部署上线(无虚拟主机,待学习)

    购买阿里云服务器 阿里云服务器ECS 系统镜像使用Ubuntu 20.04 LTS 使用ssh连接服务器,终端或者CMD中执行:$ssh root@x.x.x(阿里云服务器账号名@公网地址) 输入账号 ...

  10. 一文聊透Apache Hudi的索引设计与应用

    Hudi索引在数据读和写的过程中都有应用.读的过程主要是查询引擎利用MetaDataTable使用索引进行Data Skipping以提高查找速度;写的过程主要应用在upsert写上,即利用索引查找该 ...