APM ¿¡¼­ UTF-8 »ç¿ë
Á¶È¸ : 556 À̸§ : ºÒ¹Ù´Ù
E-mail :
APM ¿¡¼­ UTF-8 »ç¿ë | µðºñ°ü·Ã 05/12/19 06:59


mysql> status;
--------------
C:\APM_Server\MySQL-5.0.19\bin\mysql.exe Ver 14.12 Distrib 5.0.19, for Win32 (ia32)

Connection id: 1
Current database:
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.0.19-nt
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
TCP port: 3306
Uptime: 26 sec

Threads: 1 Questions: 3 Slow queries: 0 Opens: 0 Flush tables: 1 Open tables: 6 Queries per second avg: 0.115
--------------

mysql> show variables like 'c%';
+--------------------------+--------------------------------------------+
| Variable_name | Value |
+--------------------------+--------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | C:\APM_Server\MySQL-5.0.19\share\charsets\ |
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
| completion_type | 0 |
| concurrent_insert | 1 |
| connect_timeout | 5 |
+--------------------------+--------------------------------------------+
14 rows in set (0.00 sec)


Á¾·¡¿¡´Â ȨÆäÀÌÁö°¡ ÀÚ±¹Àε鸸 ÀÌ¿ëÇÒ °ÍÀ» ¿¹»óÇÏ°í Á¦ÀÛÇÏ¹Ç·Î½á ¿Ü±¹ÀÎ Áï, ºñÇÑ±Û »ç¿ëÀڵ鿡 ´ëÇÑ ¼­ºñ½º¸¦ ¹ÌÃÄ ¿°µÎ¿¡ µÎÁö ¸øÇϹǷνá ÇѱÛÀÌ ?????$%^&( ó·³ ±úÁ® º¸ÀÌ´Â ¹«ÁöÇÔÀ» º¸¿´´ø °ÍÀÌ »ç½ÇÀÔ´Ï´Ù.

ÀÌÁ¦´Â ȨÆäÀÌÁö Á¦ÀÛµµ À¯´ÏÄÚµå(UTF-8) ÀÎÄÚµù ¹æ½ÄÀÌ ¼¼°èÀû Ãß¼¼À̸ç ÀÌ·¯ÇÑ Ãß¼¼¿¡ ¸ÂÃß¾î MySqlµµ ±âº»¾ð¾î¸¦ utf8(UTF-8 ÀÎÄÚµù) ¹æ½ÄÀ¸·Î º¯°æÇÏ¿´À¸¹Ç·Î, ȨÆäÀÌÁö¸¦ Á¾·¡ euc-kr µî Çѱ۷θ¸ Ç¥±âÇÏ´ø ¹æ½Äµµ UTF-8 ÀÎÄÚµù ¹æ½ÄÀ¸·Î ¾÷µ¥ÀÌÆ®ÇØ¾ß ÇÒ ¶§ ÀÔ´Ï´Ù. UTF-8 ÀÎÄÚµù ¹æ½ÄÀº Çѱ¹¾î, ÀϾî, Áß±¹¾î, ű¹¾î, ¾Æ¶ø¾î µî ¸¸±¹¾î Ç¥±â°¡ °¡´ÉÇÑ ¹æ½ÄÀÔ´Ï´Ù.

APM¿¡¼­ UTF-8À» ±¸ÇöÇÏ·Á¸é ²Ï ¸¹Àº ºÎºÐÀ» ¼öÁ¤ÇØ¾ß ÇÕ´Ï´Ù .
´ÙÀ½Àº APM¿¡¼­ UTF-8 ±¸Çö ¹æ¹ý°ú ¼Ò½ºÄڵ带 ÷ºÎÇÕ´Ï´Ù.

Àû¿ë ȯ°æ
----------------
OS : WinXP SP2
Apache : httpd-2.0.52-3
PHP : php-5.0.3
MySQL : mysql-4.1.11
----------------

1. apache ȯ°æÆÄÀÏ ÆíÁý (httpd.conf)
2. php ȯ°æÆÄÀÏ ÆíÁý (php.ini)
3. mysql ȯ°æÆÄÀÏ ÆíÁý (my.cnf)
4. apache, mysql ¼­ºñ½º Àç½ÃÀÛ
5. mysql¿¡¼­ ij¸¯Åͼ ȮÀÎ ¹× µðºñ»ý¼º
6. php ¼Ò½ºÄڵ忡 mysql_query("set names utf8;"); ÇÔ¼ö Ãß°¡
7. php ¼Ò½º¿¡ Çѱ۹®ÀÚ¿­ÀÌ ÀÖÀ¸¸é ÆÄÀÏÀúÀåÇÒ¶§ UTF-8 ÆÄÀÏÇü½ÄÀ¸·Î ÀúÀå
8. À¥ºê¶ó¿ìÁîÀÇ º¸±â-ÀÎÄÚµù-UTF-8·Î ¼±ÅÃ

1. /etc/httpd/conf/httpd.conf ¿¡¼­ ij¸¯Åͼ ¼öÁ¤
/*------------
AddDefaultCharset UTF-8

2. /etc/php.ini ¿¡¼­ ij¸¯Åͼ ¼öÁ¤
/*------------
;default_charset = "iso-8859-1"
default_charset = "utf-8"

3. /etc/my.cnf ¿¡¼­ ij¸¯Åͼ ¼öÁ¤
/*------------
[client]
#password = your_password
default-character-set=utf8

[mysqld]
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_general_ci
init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8

[mysql]
default-character-set=utf8

4. ȯ°æº¯¼ö¸¦ ¸ðµÎ ¼öÁ¤ÈÄ apache ¹× mysql ¼­ºñ½º Àç½ÃÀÛ
/*------------

5. mysql¿¡¼­ ij¸¯Åͼ ȮÀÎ
/*------------
# 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)

* MySql¿¡¼­ µ¥ÀÌÅͺ£À̽º »ý¼º
mysql>CREATE DATABASE µðºñ¸í DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


--------------------------------------------------------------------------------

ÀÌ ±Û¿¡ ´ëÇÑ ´ñ±ÛÀÌ ÃÑ 3°Ç ÀÖ½À´Ï´Ù.

¾Æ¿ô·è ÀͽºÇÁ·¹½º¿¡¼­ UTF-8 ÀÌµç ´Ù¸¥ ÀÎÄÚµù ¹æ½ÄÀÇ À̸ÞÀÏÀÌµç ±úÁöÁö ¾Ê°í ¼ö½ÅÇÏ´Â ¼³Á¤¹æ¹ýÀÔ´Ï´Ù. À§ º»¹®ÀÇ 9¹ø Ç׸ñ Ãß°¡ÀÔ´Ï´Ù.

---------------------------------------------------------

9. ¾Æ¿ô·è ÀͽºÇÁ·¹½º : µµ±¸->¿É¼Ç->Àбâ->±Û²Ã->ÀÎÄÚµù:À¯´ÏÄÚµå(UTF-8)->
±âº»¼³Á¤ Ŭ¸¯. ±¹°¡º° ¼³Á¤->"¸ðµç ¹Þ´Â ¸Þ½ÃÁö¿¡ ±âº» ÀÎÄÚµù »ç¿ë"¿¡´Â üũ¸¦ ÇØÁ¦.
(¿©±â¿¡ üũÇϸé EUC-KR À̳ª ´Ù¸¥ ¾ð¾î·Î ÀÛ¼ºµÈ ¸ÞÀÏÀº ±úÁö°Ô µÊ)

¾ËÂ¥Ãʺ¸´ÔÀÌ 2005-09-24 18:29:14¿¡ ÀÛ¼ºÇÑ ´ñ±ÛÀÔ´Ï´Ù.

Edit £ØÇöÀç±îÁöµµ ´ëºÎºÐÀÇ À¥»çÀÌÆ®µéÀÌ euckr ·Î ÀÛ¼ºµÇ¾î ÀÖ´Â ½ÇÁ¤ÀÌ°í... ¾î´À¼ø°£ ¿äÀÌ~¶¥ Çؼ­ ¸ðµÎ µ¿½Ã¿¡ utf8 ·Î º¯È¯ÇÒ ¼öµµ ¾ø´Â »óÅ¿¡¼­... euckr ¿¡¼­ utf8 ·Î ÀÚ¿¬½º·¹ ³Ñ¾î°¥ ¼ö ÀÖ´Â ¹æ¹ýÀÌ ÇÊ¿äÇѵí ÇÕ´Ï´Ù.. ±×·²·Á¸é DB Â÷¿ø¿¡¼­ ÀÎÄÚµù º¯È¯ÀÌ °¡´ÉÇØ¾ß ÇÒµíÇѵ¥... ¿©·¯¹æ¸éÀ¸·Î Å×½ºÆ®ÁßÀ̱ä ÇÏÁö¸¸... °í¹ÎÀ̳׿ä.. ^^;;

ÀÌ°æȯ(babocom)´ÔÀÌ 2005-10-04 09:44:19¿¡ ÀÛ¼ºÇÑ ´ñ±ÛÀÔ´Ï´Ù.

Àúµµ Fedora Core 4¿¡¼­ euckrÀ» »ç¿ëÇØ ±âÁ¸ÀÇ µ¥ÀÌÅͺ£À̽ºÀÇ ÀڷḦ »ç¿ëÇÏ°íÀÚ ¿©·¯ ¹®¼­µéÀ» ºÃ¾ú½À´Ï´Ù. ÀÌ ¹®¼­µµ ±× Áß ÇÑ°¡Áö Àä ÀÌ´ë·Î Çϸé APM°ú ¿î¿µÃ¼Á¦ÀÇ CharsetÀÌ UTP-8À̱⠶§¹®¿¡ »õ·Î »ý¼ºÇÑ DB¿Í PHP¹®¼­µéÀº ¸ðµÎ ÇѱÛÀÌ Àß Àû¿ëµË´Ï´Ù. ÇÏÁö¸¸ ±âÁ¸¿¡ ¸¸µé¾ú´ø(EUCKR) ¹®¼­µé(phpÆÄÀÏ)Àº VIÆíÁý±â·Î ¿­¾îº¸´Âµ¥µµ ÇѱÛÀÌ ±úÁ®¼­ ³ª¿À°Ô µÇ¸ç À¥¿¡¼­µµ ±úÁ®¼­ ³ª¿À°Ô µÇ°í ±âÁ¸ÀÇ µ¥ÀÌÅͺ£À̽º ÀÚ·á ¶ÇÇÑ ÇѱÛÀÌ ±úÁ®¼­³ª¿É´Ï´Ù. ÇÏÁö¸¸ Fedora Core4ÀÇ CharsetÀ» euckr·Î º¯°æÇϸé.... ¸ðµç°Ô ÇØ°á µÇ´õ±º¿ä....

¸ÕÀú APM ¼³Ä¡½Ã EUCKR·Î ¼³Ä¡ÇÑ ÈÄ¿¡


vi /etc/sysconfig/i18n

LANG="ko_KR.UTF-8" --> LANG="ko_KR.EUC_KR"
SUPPORTED="ko_KR.UTF-8:ko_KR:ko" --> SUPPORTED="ko_KR.EUC_KR:ko_KR:ko"

Ctrl + Alt + ¹é½ºÆäÀ̽º ¶Ç´Â ÀçºÎÆÃ

ÀÌ·¸°Ô Çϸé Fedora Core4¿¡¼­µµ ÇÑ±Û »ç¿ë°¡´ÉÇÕ´Ï´Ù.
¹°·Ð ±âÁ¸ÀÇ µ¥ÀÌÅ͵µ »ç¿ëÇÒ ¼ö ÀÖ°í¿ä ^^

ÀÌÈÆÈñ(warm)´ÔÀÌ 2005-11-03 11:04:23¿¡ ÀÛ¼ºÇÑ ´ñ±ÛÀÔ´Ï´Ù.
ÀÌ ´ñ±ÛÀº 2005-11-03 11:07:17¿¡ ¸¶Áö¸·À¸·Î ¼öÁ¤µÇ¾ú½À´Ï´Ù.


--------------------------------------------------------------------------------

¿ø±Û : http://www.powerdb.net/?inc=read&aid=24452&criteria=mysql&subcrit=columns&id=&limit=20&keyword=&page=1

µ¡±Û¾²±â | ¿«ÀÎ±Û ¾²±â


ÀÌ ±ÛÀÇ Æ®·¢¹é ÁÖ¼Ò : http://www.todayis.net/vSix/rserver.php?mode=tb&sl=517


ÀÛ¼º ³¯Â¥ : 2008-02-14