끄적끄적
database 케릭터셋 확인
show variables like 'char%';
@ /etc/my.cnf 파일에 설정 - 이 설정 방법을 추천 mysql 데몬이 재실행 되어도 설정을 유지 합니다.
mysql>sudo vi /etc/my.cnf
$$$$$$$$$$$$$UTF-8 설정
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
default-character-set=utf8
[mysqld]
init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_general_ci
port = 3306
socket = /tmp/mysql.sock
basedir = /opt/mysql/mysql
datadir = /opt/mysql/mysql/data
set-variable = table_cache=1024
set-variable = max_connections=500
set-variable = max_user_connections=100
set-variable = max_connect_errors=10000
log-slow-queries
set-variable = long_query_time=3
skip-name-resolve
# InnoDB 사용 안할시 아래 내용추가
#skip-innodb
sync_binlog = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
default-character-set=utf8
$$$$$$$$$$$$$EUCKR 설정
[client]
default-character-set=euckr
[mysqld]
default-character-set=euckr
init_connect=SET collation_connection=euckr_korean_ci
init_connect=SET NAMES euckr
character-set-server=euckr
collation-server=euckr_korean_ci
port = 3306
socket = /tmp/mysql.sock
basedir = /opt/mysql/mysql
datadir = /opt/mysql/mysql/data
set-variable = table_cache=1024
set-variable = max_connections=500
set-variable = max_user_connections=100
set-variable = max_connect_errors=10000
log-slow-queries
set-variable = long_query_time=3
skip-name-resolve
# InnoDB 사용 안할시 아래 내용추가
#skip-innodb
sync_binlog = 1
[mysqldump]
default-character-set=euckr
[mysql]
default-character-set=euckr
댓글
댓글 쓰기