[Err] 1071 - Specified key was too long; max key length is 767 bytes 这个会出现在MySQ5.7以下版本 因为没有启用innodb_large_prefix MySQL 5.6: MySQL 5.7: 简单办法:如果要求不是很高 ,也可以直接把表字段varchar(255)设置为varchar(64) 另外一种:修改配置 (重启服务会失效) mysql> show variables like '%innodb_large_pr…
ref: https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes 转载 https://blog.csdn.net/LJFPHP/article/details/80406907 一.背景 今天把服务器的数据库导出了一份sql文件,准备导入到本地,但是在导入的时候,报了个错: Syntax error or access violation: 1…
mysql执行update报错 Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY 今天开发的同事发来如下错误信息,最最简单的一个update操作,竟然报了[Err] 1055 - 'information_schema.PROFILING.SEQ' isn't in GROUP BY.具体sql语句为: [SQL]UPDATE draw_record SET open_price = '6945.98', buy_p…
mysql报错1105 -without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER. 在本地正常,但是在服务器报错.原来是服务器版本和主键的问题. 服务器为5.7.18-15-57-log.本地为10.1.12-MariaDB. 这个表没有主键,所以服务器报错,添加主键即可.…
Specified key was too long; max key length is 767 bytes 此错误为hive 元数据mysql 字符集编码问题 如 show create table PARTITIONS ; utf-8会报上述错误. 要把CHARSET=utf-8 修改为 CHARSET=latin1: alter table PARTITIONS convert to character set latin1; 所以最好在hive 建库之初就设置好字符集编码 alter…
Laravel 默认使用utf8mb4字符编码,而不是的utf8编码.因此运行php artisan migrate会出现如下错误: [Illuminate\Database\QueryException] SQLSTATE[]: Syntax error or access violation: Specified key was too long; max key length is bytes (SQL: alter table users add unique users_email_u…
1.原因:在进行 迁移文件生成时,程序并未给varchar类型字段设置 合适的长度,导致报错. 2.解决办法:找到database/ 目标迁移文件,修改其中类型为string的字段长度,建议不要超过255,否则报错 [然后再次运行php artisan migrate 即可成功] 示例: MySQL: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes 今天测试遇到了这样的问题: MySQL> u…
原文链接:https://blog.csdn.net/bao19901210/article/details/51917641 二进制安装 1.添加mysql组和mysql用户,用于设置mysql安装目录文件所有者和所属组.  ①groupadd mysql  ②useradd -r -g mysql mysql  * useradd -r参数表示mysql用户是系统用户,不可用于登录系统.  * useradd -g参数表示把mysql用户添加到mysql用户组中. 2.将二进制文件解压到指定…
Mysql报错注入原理分析(count().rand().group by) 0x00 疑问 一直在用mysql数据库报错注入方法,但为何会报错? 百度谷歌知乎了一番,发现大家都是把官网的结论发一下截图,然后执行sql语句证明一下结论,但是没有人去深入研究为什么rand不能和order by一起使用,也没彻底说明三者同时使用报错的原理. 0x01 位置问题? select count(*),(floor(rand(0)*2))x from information_schema.tables gr…
今天在学习laravel的路由模型绑定时,在按照文档执行php artisan migrate时报错. In Connection.php line 664: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(…