Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 특정 패키지 업데이트 중지 / 해제
- rsync
- openfire
- mongodb
- 날짜계산
- 앞으로 가기
- node 이미지 저장
- xcache
- MySQL
- security.limit_extensions
- quota
- 이미지주소추출
- php
- 훼인
- php-fpm
- 리플리케이션 오류
- strtotime
- 쁘띠프랑스
- 재귀쿼리
- 뒤로 가기
- node.js
- 태권v
- 외래키
- 중독 게임
- ssmtp
- 워드프레스한글팩
- simplexml_load_filesimplexml
- no key alg
- set foreign_key
- 태권브이
Archives
- Today
- Total
일상 기록 창고
Specified key was too long; max key length is 767 bytes 본문
- 다음과 같은 오류 발생 시
Specified key was too long; max key length is 767 bytes utf8mb4 의 경우 varchar(191) 까지만 인덱스 가 가능하다. VARCHAR(255)이 차지하는 최대 bytes 수 - utf8인 경우 255 x 3 = 765 bytes (인덱스 가능) - utf8mb4인 경우 255 x 4 = 1020 bytes (인덱스 불가능!) VARCHAR(191) - utf8mb4인 경우 191 x 4 = 764 bytes (인덱스 가능) |
해결1 : 인덱스에 191byte 로 지정하기
KEY IDX_KEY ( `cData`(191) ) |
해결2 : my.conf 설정 변경
innodb_file_format = barracuda innodb_large_prefix = on 저장 후 재 시작. 테이블 새로 생성 구문에 다음과 같은 구문 추가 create table test ( .... ) ROW_FORMAT = DYNAMIC |
'프로그래밍 > mysql' 카테고리의 다른 글
mysql_config_editor 사용하기 (0) | 2019.07.10 |
---|---|
Slave SQL: If a crash happens this configuration does not guarantee that the relay log info will be consis (0) | 2019.05.29 |
현재 날짜의 주차 구하기 (0) | 2017.07.27 |
우분투에서 mysql apt 설치 후 데이터 디렉토리 옮기기 (0) | 2016.05.29 |
16.04 에 mysql 5.7x 버전 설치 깔끔하게 지우기. (0) | 2016.05.29 |