Mac 의 MySQL 에서 character 확인하기.
mysql> \s
--------------
./usr/local/mysql/bin/mysql Ver 14.14 Distrib 5.1.47, for apple-darwin10.3.0 (i386) using readline 5.1
Connection id: 4
Current database:
Current user: johnkim@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.1.47 MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /tmp/mysql.sock
Uptime: 1 hour 33 sec
Threads: 1 Questions: 50 Slow queries: 0 Opens: 19 Flush tables: 1 Open tables: 12 Queries per second avg: 0.13
------------------------------
mysql> SET character_set_client = utf8;
mysql> SET character_set_results = utf8;
mysql> SET character_set_connection = utf8;
mysql> ALTER DATABASE [DB명] DEFAULT CHARACTER SET utf8;
commit;
mysql> \s
--------------
./usr/local/mysql/bin/mysql Ver 14.14 Distrib 5.1.47, for apple-darwin10.3.0 (i386) using readline 5.1
Connection id: 4
Current database:
Current user: johnkim@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.1.47 MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /tmp/mysql.sock
Uptime: 1 hour 33 sec
Threads: 1 Questions: 50 Slow queries: 0 Opens: 19 Flush tables: 1 Open tables: 12 Queries per second avg: 0.13
------------------------------
mysql> SET character_set_client = utf8;
mysql> SET character_set_results = utf8;
mysql> SET character_set_connection = utf8;
mysql> ALTER DATABASE [DB명] DEFAULT CHARACTER SET utf8;
commit;
'Mac > Software' 카테고리의 다른 글
Mac 에서 Maven 설정한 뒤 IntelliJ IDEA 에서 실행하기. (0) | 2010.06.18 |
---|---|
Mac 에서 MySQL 설정파일 수정하기. (0) | 2010.06.15 |
Mac 에서 telnet 으로 접속하기. (0) | 2010.06.14 |
Mac 에서 Tomcat 6 실행하기. (0) | 2010.06.11 |
MySQL 재설치. (0) | 2010.06.07 |