IT/troubleshooting
[Mac OSX 10.8] MAC에서 MySQL UTF-8설정
TY
2012. 11. 22. 03:05
참다참다 못참아서 그냥 설정 뒤집어 깜.
환경:
- mbp 13" early 2011 (2.7@Intel core i7, ddr3 4G, hd graphics 384mb)
- osx 10.8.2 (mountain lion)
- mysql 5.5.27
1. /etc/my.cnf 가 없어요!
Open Terminal (in Utilities folder under Applications folder)
cd /usr/local/mysql/support-files/ sudo cp my-huge.cnf /etc/my.cnf
and enter your admin password when prompted. You could do this from a non-admin account by using the su command, but that's probably a bit scary for some people ;)
You will now have a copy of my.cnf in /etc (just in case you don't know, that means the etc folder directly under the root folder, not under MySQL's install folder)
You can edit it with a text-editor such as TextWrangler by using File->Open Hidden, or if you are happy to use the command line, use:
cd /etc
출처: http://forums.mysql.com/read.php?11,366143,376017#msg-376017
2. 이제 설정을 덮어씌워요!
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
init_connect=SET collation_connection=utf8_general_ci
init_connect=SET NAMES utf8
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
를 각각에 추가
출처: http://mirwebma.tistory.com/5
3. 껐다 켜요!
4. 확인을 해봐요 !
와 된다 ..ㅋ.. 그 전에 만들어 놓은 테이블들은 어쩌죠...ㅋ...ㅋ.. 다 날려야징..ㅋ..ㅜㅜ