|
|
ERROR 1071 (42000) at line 162: Specified key was too long; max key length is 767 bytes. I! L4 b; J0 m! W* x5 a B
% x* Z& c X) h! h9 k* A( i m: O导入数据库时报错:
' I4 C3 W' n' g$ J' Z2 ?[mysqld]; \, T* J" n# I, W3 A
$ {, `; {; r3 O2 [& Y& ^9 A0 f K
innodb_file_format = Barracuda$ R" f4 X: T d
innodb_file_format_check = ON0 l+ x& q, b7 A4 A
innodb_file_format_max = Barracuda
4 G* O1 O# I4 C: |3 p[mysql.server]
9 t/ v8 k; u4 R& J6 S' Kinnodb_file_format = Barracuda
, X/ K' m& {, p+ @+ b# T) P) Finnodb_file_format_check = ON: W/ f) Q! j+ n/ t
innodb_file_format_max = Barracuda
5 F/ w, O! l% T( S( o
4 L! d6 c: K% ~: V& Q6 P- P+ b) c' j! j6 K
在my.cnf文件中添加上面信息:
* ?$ \" D: x( {8 `1 D9 o6 v& U6 z) c s+ m9 ]: k
collation-server = utf8mb4_general_ci( T6 f# E& j5 T8 ?3 ~
init-connect = 'SET NAMES utf8mb4'% M) H' V% B" R: y: `3 p4 A- p3 ?( S. F
character-set-server = utf8mb4
) e. A, p/ L. M5 V7 R% [& _innodb_file_format = Barracuda
@/ g* p9 }, c: ^0 |innodb_file_format_check = ON# Y" v) ]! R# u8 R- i3 C5 W9 d
innodb_file_format_max = Barracuda
* v1 \, _ w( D$ ^' G! M1 Ninnodb_large_prefix = ON
* N/ m- [ j- I% ?[mysql.server]
0 a' p; |! C3 J* Hinnodb_file_format = Barracuda
* V3 j% ], D" cinnodb_file_format_check = ON
4 n4 ?; E3 \$ a% h9 i# @# k" ginnodb_file_format_max = Barracuda
- I h2 D: Y. g7 T: [3 Iinnodb_large_prefix = ON e( [; p. Z" [- Y3 D/ t( y
default-character-set = utf8mb4; {3 B" w+ c) e% J
character_set_server = utf8mb4) I- U; l, n2 |( v6 U8 q2 A
[client]- }3 p( r0 u& Z& c# c
default-character-set = utf8mb4
- i: B2 r8 e+ ^( Q2 b" \[mysqld_safe]
" Q$ H" b( |$ G6 M; l1 E: Idefault-character-set = utf8mb48 Q) {6 C, w5 T8 H. [# S" W
& {* E0 h; ^+ E( }" N, | |
|