mysql 인스톨
yum install mysql
yum install mysql-server
mysql 인스톨후 데이터베이스 설치
/usr/bin/mysql_secure_installation

mysql 시작과 종료
/etc/init.d/mysqld start/stop

mysql charset 확인하기
mysql -uroot -p
> status;
or
> \s
or
> show variables like '%c';
mysql charset utf-8 설정하기
vi /etc/my.cnf
다음 추가
[mysql]
default-character-set = utf8

[mysqld]
...
character-set-client-handshake=FALSE
init_connect="SET collation_connection = utf8_general_ci"
init_connect="SET NAMES utf8"
default-character-set = utf8
character-set-server = utf8
collation-server = uf8_general_ci (이것때문에 서버 시작 안되는 경우있으니 주의할것.)

[client]
default-character-set = utf8

[mysqldump]
default-character-set = utf8

'알짜정보 > Linux server' 카테고리의 다른 글

cent os apache virtual host 설정  (18) 2011.01.02
cent os php 설치  (35) 2011.01.02
cent os apache 설치  (28) 2011.01.02
cent os java 설치  (56) 2011.01.02
cent os 기본정보 확인  (24) 2010.12.30
by cranix 2011. 1. 2. 18:51