다국어 지원을 위해 UTF-8를 주로 쓰는 편임

Mysql JDBC를 이용해 insert를 하는 경우 데이터베이스가 utf8임에도 깨져 들어가는 경우.

JDBC Connection URL에 useUnicode, characterEncoding파라미터를 붙여줌.

예) jdbc:mysql://localhost:3306/database?useUnicode=true&characterEncoding=utf8


Posted by ukmie
,
컬럼에
ALTER TABLE `organizations`
  CHANGE `Location` Location VARCHAR(50) CHARACTER SET utf8;
테이블에
ALTER TABLE `organizations` CHARACTER SET utf8;
MySQL 환경설정에
[client]
...
default-character-set=utf8
...
[mysql]
...
default-character-set=utf8
...
[mysqld]
...
default-character-set=utf8
다른 문자셋.. euckr, lantin1, iso-8859-1, ascii, binary ,,,.

Posted by ukmie
,
몇가지 방법이 있지만 이게 젤 편한것 같다. 근데도 맨날 까먹는다.--
또다른방법:http://radiocom.kunsan.ac.kr/lecture/mysql/user_add.html
MySQL매뉴얼: http://www.mysqlkorea.co.kr/sub.html?mcode=develop&scode=01&lang=k

mysql> create database ontowiki;
Query OK, 1 row affected (0.01 sec)

mysql> grant all on ontowiki.* to ontowiki@localhost identified by 'xxx'
    -> with grant option;
Query OK, 0 rows affected (0.01 sec)

Posted by ukmie
,