반응형
apache 와 php 설정파일에서 언어설정을 모두 주석처리합니다.
mysql설정파일을 아래와 같이 수정합니다.
1. /etc/my.cnf 에서 캐릭터셋 수정
[client]
#password = your_password
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
[mysql]
default-character-set=utf8
2. 환경변수를 모두 수정후 apache 및 mysql 서비스 재시작
3. mysql에서 캐릭터셋 확인
# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 247 to server version: 4.1.10a
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use test
Database changed
mysql> show variables like 'c%';
+---------+-----------+
| Variable_name | Value |
+---------+-----------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
| concurrent_insert | ON |
| connect_timeout | 5 |
+---------+-----------+
12 rows in set (0.00 sec)
출처: www.sir.co.kr
mysql설정파일을 아래와 같이 수정합니다.
1. /etc/my.cnf 에서 캐릭터셋 수정
[client]
#password = your_password
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
[mysql]
default-character-set=utf8
2. 환경변수를 모두 수정후 apache 및 mysql 서비스 재시작
3. mysql에서 캐릭터셋 확인
# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 247 to server version: 4.1.10a
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use test
Database changed
mysql> show variables like 'c%';
+---------+-----------+
| Variable_name | Value |
+---------+-----------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
| concurrent_insert | ON |
| connect_timeout | 5 |
+---------+-----------+
12 rows in set (0.00 sec)
출처: www.sir.co.kr
반응형
'서버관리 > Linux' 카테고리의 다른 글
block proxy servers from site access (0) | 2009.09.02 |
---|---|
중국아이피 리스트 (0) | 2009.04.17 |
간단한 arp공격 방어법 (0) | 2009.04.14 |
간편한 iptables 설정법 (0) | 2009.04.14 |
Linux 에서의 SYN공격방어. (0) | 2009.03.25 |