易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 469|回复: 0
收起左侧

ERROR 1071 (42000) at line 162: Specified key was too long; max key length is 76

[复制链接]
发表于 2022-10-26 10:00:33 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
ERROR 1071 (42000) at line 162: Specified key was too long; max key length is 767 bytes7 t4 H+ m3 W5 b1 K$ p
% V! V; v* |7 R+ d8 M; [
导入数据库时报错:/ j- p0 l& Q3 k1 v; u6 f
[mysqld]
6 j0 b+ Q/ b* w5 M- s5 e4 b& F" G7 o1 U) o1 R
innodb_file_format = Barracuda1 d0 a3 ~9 z" d4 Y
innodb_file_format_check = ON) ]+ G1 r& \' |' z9 o6 E) F' V: m
innodb_file_format_max = Barracuda
: E( d/ B( [2 G& J7 E. r[mysql.server]
6 A* S) m/ M2 I' T+ j8 r! q+ y' Ginnodb_file_format = Barracuda7 P4 N+ U$ k5 J3 X: b9 t3 L
innodb_file_format_check = ON2 N4 c0 c5 I/ ~
innodb_file_format_max = Barracuda
# w, P* l. `* F9 A: k
% C: x3 T+ ]6 ]7 a3 e! h; [6 z/ Y, }1 o
在my.cnf文件中添加上面信息:
3 |4 I# {  l: x& D4 Q2 X. e' t  I
% o# R# p$ a) ~0 z4 N: ]8 j" ^( c4 wcollation-server = utf8mb4_general_ci3 V7 C: e5 K" P2 H
init-connect = 'SET NAMES utf8mb4'+ c6 S  Z4 z' D, b3 `9 c
character-set-server = utf8mb4$ F' @1 U) Q% \. J% s- ~) B  e$ k
innodb_file_format = Barracuda
( T0 e+ t7 j* X% linnodb_file_format_check = ON  \2 {% F* h; V* i" k0 `: y
innodb_file_format_max = Barracuda
! ?" \1 ?5 M7 V7 ]: G0 j! g: finnodb_large_prefix = ON% |. m! N3 {& W$ C$ C; W% C# R5 E
[mysql.server]& a% C4 }: v! f4 e- J5 M
innodb_file_format = Barracuda
. h$ t4 _5 A0 Z+ _' X" T. Zinnodb_file_format_check = ON
1 c3 K% C, s# e4 einnodb_file_format_max = Barracuda
7 O8 m0 \9 m, y$ z, Z. ^9 Cinnodb_large_prefix = ON
% d/ n6 D  t: _5 ldefault-character-set = utf8mb4
. T( ~! K+ a) D$ A3 q. zcharacter_set_server = utf8mb40 J7 }1 ?' q, {3 N: Q$ w
[client]
" M3 Q1 G2 z! H, ^8 K% }' A5 Mdefault-character-set = utf8mb4
5 ^6 U' t1 O3 c7 r  p# u; C[mysqld_safe]! n! W$ {7 y7 O% r( _
default-character-set = utf8mb4
/ E  e5 Z8 _# c6 e; \
: [/ F% l  x# E' |! Z3 I# c
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 13:44 , Processed in 0.037937 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表