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
- 테스트 이미지
- RGB WEB
- test image
- springboot
- Devtools
- livereload
- 새로고침
- color site
- RGB 생성
- 팬톤 색상 웹
- Spring
- 웹 테스트 이미지
Archives
- Today
- Total
기억은 휘발성 메모리
Linux Mysql 한글 깨짐 현상 본문
WSL MySQL 한글 인코딩 문제
문제
스프링으로 TODO List 프로젝트 중 한글 인코딩 문제가 발생했다.
Error : Incorrect string value
원인
리눅스에서 Mysql 최초 설치시 character set이 latin1 로 설정 되어있기 때문에 한글이 깨지는 현상이 발생한다.
mysql 에서 현재 인코딩 확인하는 방법
xxxxxxxxxx
status
혹은
xxxxxxxxxx
show variables like 'c%';
해결
Linux의 경우 mysqld.cnf 와 mysql.cnf 파일 수정
$ sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld] 부분에 추가
init_connect = SET collation_connection = utf_general_ci init_connect = SET NAMES utf8 character-set-server = utf8 collation-server = utf8_general_ci
$ sudo vi /etc/mysql/conf.d/mysql.cnf
[client] 부분에 추가
default-character-set = utf8
[mysqldump] 부분에 추가
default-character-set = utf8
출처: https://nicesea.tistory.com/6 [Life will get better]
' Things to remember > Mysql' 카테고리의 다른 글
Mysql user 생성 권한 부여 (0) | 2019.03.27 |
---|
Comments