mysqladmin ÃÑÁ¤¸®
±Û   ¾´   ÀÌ linux
³¯         Â¥ 2004³â 03¿ù 23ÀÏ 00½Ã 31ºÐ 28ÃÊ
º»         ¹® mysqladmin ÃÑÁ¤¸® | MYSQL 2004/03/18 09:58

http://blog.naver.com/lunasea94/1343094

mysqladmin



¢º ÀÛ¼ºÀÚ : ¿îºñ(unbinara@dreamwiz.com)

¢º ÀÛ¼º¿Ï·áÀÏ : 2001³â 12¿ù 8ÀÏ(Åä)

¢º ¹èÆ÷±ÇÇÑ : »ó°ü¾øÀ½(ÀÛ¼ºÀÚ¸¸ Ç¥½ÃÇØ Áֱ⠹ٶ÷ <-- ¿¹ÀÇ»ó..^^;)

¢º Âü°í»çÇ× : ¹ø¿ª½Ã 100% ¿Ïº®ÇÏÁö´Â ¾ÊÀ½



¢¹mysqladmin -u root -p proc stat(=processlist) --> ¼­¹ö¿¡ ÇöÀç È°µ¿ÁßÀÎ threads»óź¸±â

Enter password:
+------+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+------+-----------+----+---------+------+-------+------------------+
| 3704 | root | localhost | | Query | 0 | | show processlist |
+------+------+-----------+----+---------+------+-------+------------------+
Uptime: 281302 Threads: 1 Questions: 27330 Slow queries: 0 Opens: 1771 Flush tables: 1 Open tables: 64 Queries per second avg: 0.097

¢¹mysqladmin status



Uptime : the MySQL server ½ÃÀÛµÈ ÈÄ ÇöÀç±îÁö ½Ã°£ (ÃÊ)

Threads : ÇöÀç µðºñ¼­¹ö¿¡ ¿¬°áµÈ À¯Àú¼ö

Questions : ¼­¹ö½ÃÀÛÈÄ Áö±Ý±îÁö ¿äûµÈ Äõ¸®¼ö

Slow queries : --log-slow-queries[=file_name] option·Î ½ÃÀÛµÈ ¼­¹ö°¡ variables¿¡ ÁöÁ¤µÈ

long_query_time seconds½Ã°£º¸´Ù Å« Äõ¸®½Ã°£À» °¡Áø ¿äû¼ö

Opens : ¼­¹ö°¡ ½ÃÀÛµÈ ÈÄ ÇöÀç±îÁö ¿­·È´ø Å×ÀÌºí ¼ö

Flush tables : flush ..., refresh, and reload commandsµÈ ¼ö

Open tables : ÇöÀç ¿­·Á ÀÖ´Â Å×ÀÌºí ¼ö

Queries per second avg : Æò±Õ ÃÊ´ç Äõ¸®¼ö



Memory in use :the mysqld code¿¡ ÀÇÇØ Á÷Á¢ ÇÒ´çµÈ ¸Þ¸ð¸® (only available when MySQL is compiled with --with-debug=full).

Max memory used : the mysqld code¿¡ ÀÇÇØ Á÷Á¢ ÇÒ´çµÈ ÃÖ´ë¸Þ¸ð¸® (only available when MySQL is compiled with --with-debug=full).



¢¹mysqladmin -u root -p ping -->µðºñ¼­¹ö°¡ »ì¾ÆÀÖ´ÂÁö È®ÀÎ

Enter password:

mysqld is alive



¢¹mysqladmin -u root -p extended-status(¡Ømysql>show stauts)

+--------------------------+-----------+

| Variable_name | Value |

+--------------------------+-----------+

| Aborted_clients | 0 |

| Aborted_connects | 7 |

| Bytes_received | 1273369 |

| Bytes_sent | 334385278 |

| Connections | 3656 |

| Created_tmp_disk_tables | 0 |

| Created_tmp_tables | 0 |

| Created_tmp_files | 0 |

| Delayed_insert_threads | 0 |

| Delayed_writes | 0 |

| Delayed_errors | 0 |

| Flush_commands | 1 |

| Handler_delete | 4 |

| Handler_read_first | 1766 |

| Handler_read_key | 3525 |

| Handler_read_next | 2052 |

| Handler_read_prev | 1859 |

| Handler_read_rnd | 757854 |

| Handler_read_rnd_next | 1975607 |

| Handler_update | 3190 |

| Handler_write | 36 |

| Key_blocks_used | 245 |

| Key_read_requests | 7473 |

| Key_reads | 245 |

| Key_write_requests | 386 |

| Key_writes | 209 |

| Max_used_connections | 1 |

| Not_flushed_key_blocks | 0 |

| Not_flushed_delayed_rows | 0 |

| Open_tables | 64 |

| Open_files | 128 |

| Open_streams | 0 |

| Opened_tables | 1768 |

| Questions | 27128 |

| Select_full_join | 0 |

| Select_full_range_join | 0 |

| Select_range | 22 |

| Select_range_check | 0 |

| Select_scan | 7694 |

| Slave_running | OFF |

| Slave_open_temp_tables | 0 |

| Slow_launch_threads | 0 |

| Slow_queries | 0 |

| Sort_merge_passes | 0 |

| Sort_range | 38 |

| Sort_rows | 757848 |

| Sort_scan | 5121 |

| Threads_cached | 0 |

| Threads_created | 3655 |

| Threads_connected | 1 |

| Threads_running | 1 |

| Uptime | 279770 |

+--------------------------+-----------+





¢¹mysqladmin -u root -p variables(¡Ømysql>show valiables)



+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| Variable_name | Value |

+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| ansi_mode | OFF |

| back_log | 50 |

| basedir | /usr/local/mysql/ |

| binlog_cache_size | 32768 |

| character_set | euc_kr |

| character_sets | euc_kr dec8 dos german1 hp8 koi8_ru latin1 latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5 |

| concurrent_insert | ON |

| connect_timeout | 5 |

| datadir | /usr/local/mysql/data/ |

| delay_key_write | ON |

| delayed_insert_limit | 100 |

| delayed_insert_timeout | 300 |

| delayed_queue_size | 1000 |

| flush | OFF |

| flush_time | 0 |

| have_bdb | NO |

| have_gemini | NO |

| have_innobase | NO |

| have_isam | YES |

| have_raid | NO |

| have_ssl | NO |

| init_file | |

| interactive_timeout | 28800 |

| join_buffer_size | 131072 |

| key_buffer_size | 8388600 |

| language | /usr/local/mysql/share/mysql/korean/ |

| large_files_support | ON |

| locked_in_memory | OFF |

| log | OFF |

| log_update | OFF |

| log_bin | OFF |

| log_slave_updates | OFF |

| long_query_time | 10 |

| low_priority_updates | OFF |

| lower_case_table_names | 0 |

| max_allowed_packet | 1048576 |

| max_binlog_cache_size | 4294967295 |

| max_connections | 100 |

| max_connect_errors | 10 |

| max_delayed_threads | 20 |

| max_heap_table_size | 16777216 |

| max_join_size | 4294967295 |

| max_sort_length | 1024 |

| max_tmp_tables | 32 |

| max_write_lock_count | 4294967295 |

| myisam_recover_options | OFF |

| myisam_sort_buffer_size | 8388608 |

| net_buffer_length | 16384 |

| net_read_timeout | 30 |

| net_retry_count | 10 |

| net_write_timeout | 60 |

| open_files_limit | 0 |

| pid_file | /usr/local/mysql/data/3egg.com.pid |

| port | 3306 |

| protocol_version | 10 |

| record_buffer | 131072 |

| query_buffer_size | 0 |

| safe_show_database | OFF |

| server_id | 0 |

| skip_locking | ON |

| skip_networking | OFF |

| skip_show_database | OFF |

| slow_launch_time | 2 |

| socket | /tmp/mysql.sock |

| sort_buffer | 2097144 |

| table_cache | 64 |

| table_type | MYISAM |

| thread_cache_size | 0 |

| thread_stack | 65536 |

| timezone | KST |

| tmp_table_size | 1048576 |

| tmpdir | /tmp/ |

| version | 3.23.32 |

| wait_timeout | 28800 |

+-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+



[±×¿Ü]

mysqladmin create [databasename] : Create a new database.

mysqladmin drop [databasename] : Delete a database and all its tables.

mysqladmin flush-hosts : Flush all cached hosts.

mysqladmin flush-logs : Flush all logs.

mysqladmin flush-tables : Flush all tables.

mysqladmin flush-privileges : Reload grant tables (same as reload).

mysqladmin kill [id(,id,...)]: Kill mysql threads.

mysqladmin password : Set a new password. Change old password to new-password.

mysqladmin reload : Reload grant tables.

mysqladmin refresh : Flush all tables and close and open logfiles.

mysqladmin shutdown : Take server down.

mysqladmin slave-start : Start slave replication thread.

mysqladmin slave-stop : Stop slave replication thread.

mysqladmin version : Get version info from server.



¢¹ mysqladmin -u root -p variables(¡Ømysql>show valiables)

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

ansi_mode

onÀ¸·Î µÇ¾îÀÖÀ¸¸é --ansi·Î ½ÃÀÛµÈ °ÍÀÌ´Ù(Running MySQL in ANSI Mode¸¦ ÂüÁ¶ÇÏ°í,¼³¸íÀº ´ÙÀ½¿¡)



back_log

mysqlÀÌ °¡Áö´Â ÇöÀúÇÑ Ä¿³Ø¼Ç¿äû¼ö

¸ÞÀÎ mysql ½º·¹µå°¡ ªÀº½Ã°£¿¡ ¸Å¿ì ¸¹Àº Ä¿³Ø¼ÇÀÌ ÀϾÀ»¶§ »ý±â¸ç, À̶§ ±×·¯ÇÑ Ä¿³Ø¼ÇÀ» üũÇÏ°í

»õ·Î¿î ½º·¹µå¸¦ »ý¼º½ÃÅ°±âÀ§ÇØ »ý±âÁö¸¸ ÀÌ·¯ÇÑ Çö»óÀº ±ØÈ÷ Àû°Ô ¹ß»ýÇÏ´Â °ÍÀÌ´Ù.

back_log´Â mysqlÀÌ ¼ø°£ÀûÀ¸·Î »õ·Î¿î ¿äû¿¡ ´äº¯ÇÏ´Â °ÍÀ» ¸ØÃß±âÀü ªÀº ½Ã°£µ¿¾È ¾ó¸¶³ª ¸¹Àº ¿äûµéÀÌ

½×ÀÏ ¼öÀÖ´ÂÁö ¾Ë·ÁÁØ´Ù. ¸¸¾à, ªÀº ½Ã°£µ¿¾È ¸¹Àº ¼öÀÇ Ä¿³Ø¼ÇÀÌ »ý±æ°ÍÀ» ¿¹»óÇÑ´Ù¸é back_log¸¦ Áõ°¡½ÃÄÑÁÖ¾î¾ß ÇÑ´Ù

back_log¸¦ ´Ù¸¥¸»·Î Ç¥ÇöÇÏ¸é µé¾î¿À´Â TCP/IPÄ¿³Ø¼Ç¿¡ ´ëÇؼ­ ±Í±â¿ïÀ̴ ťÀÇ ¼öÀÌ´Ù.

»ç¿ëÀÚOS¸¶´Ù ÀÌ·¯ÇÑ Å¥ÀÇ »çÀÌÁî¿¡ ÇÑ°è°¡ ÀÖ´Ù. µû¶ó¼­, ÀڽŵéÀÌ °¡Áö°í ÀÖ´Â OSÀÇ ¸Þ´º¾óÀ» Âü°íÇÏ¿©

ÃÖ´ëÄ¡°¡ ¾ó¸¶ÀÎÁö È®ÀÎÇÏ¿©¾ß ÇÑ´Ù. ¶ÇÇÑ, ÀÚ½ÅÀÇ OS½Ã½ºÅÛÀÌ °¡Áö´Â ÇÑ°èÄ¡º¸´Ù ³ô°Ô back_log¸¦ °¡Áö¸é È¿°¡°¡ ¾ø´Ù.



basedir

mysqlÀÌ ¼³Ä¡µÈ ±âº» µð·ºÅ丮



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

bdb_cache_size

bdbÅ×ÀÌºí¿¡ ´ëÇÑ rows¿Í Àε¥½º Äɽ¬¿¡ ÇÒ´çµÈ ¹öÆÛ

bdbÅ×À̺íÀ» »ç¿ëÇÏÁö¾Ê´Â´Ù¸é ½ÃÀÛÇÒ ¶§ --skip-dbd·Î ½ÃÀÛÇØ¾ß ÀÌ·¯ÇÑ Äɽ¬¿¡ ´ëÇØ ¸Þ¸ð¸®¸¦ ³¶ºñÇÏÁö ¾Ê´Â´Ù



bdb_log_buffer_size

dbdÅ×À̺íÀÇ À妽º¿Í rows¸¦ Äɽ¬Çϴµ¥ ÇÒ´çµÈ ¹öÆÛ

bdbÅ×À̺íÀ» »ç¿ëÇÏÁö¾Ê´Â´Ù¸é ½ÃÀÛÇÒ ¶§ --skip-dbd·Î ½ÃÀÛÇØ¾ß ÀÌ·¯ÇÑ Äɽ¬¿¡ ´ëÇØ ¸Þ¸ð¸®¸¦ ³¶ºñÇÏÁö ¾Ê´Â´Ù



bdb_home

--dbd-home¿É¼ÇÀ¸·Î ¼³Ä¡ÇßÀ»´ë ³ªÅ¸³ª´Â ¹öŬ¸®µðºñ Ȩµð·ºÅ丮



bdb_max_lock

±ä Æ®·¢Àè¼ÇÀ̳ª mysqlÀÌ Äõ¸®°è»ê½Ã¿¡ ¸¹Àº rows¸¦ °Ë»çÇؾ߸¸ ÇÒ¶§, lockÅ×À̺íÀÌ 12°³ÀÇ ¿¡·¯È¤Àº lockÀÌ °¡´ÉÇÏÁö ¾Ê´Â

dbdŸÀÔÀÇ ¿¡·¯°¡ ¹ß»ýµÇ¸é bdb_max_lock¸¦ Áõ°¡½ÃÄѾßÇÑ´Ù. µðÆúÆ®´Â 1000À̸ç bdbÅ×À̺íÀ» È°¼ºÈ­½Ãų¼öÀÖ´Ù



bdb_logdir

--bdb-logdir ¿É¼ÇÀ» ÁÖ¾úÀ»¶§ ³ªÅ¸³­´Ù



bdb_shared_data

--bdb-shared-dataÀ» »ç¿ëÇϸé onµÈ´Ù



bdb_tmpdir

--bdb-tmpdir¿É¼ÇÀ» ÁÖ¾úÀ» ¶§



¡Ø À§´Â ¹öŬ¸®µðºñ¸¦ »ç¿ëÇÏ¿´À» ¶§ ³ªÅ¸³ª´Â valuesÀÌ´Ù

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



binlog_cache_size.

Æ®·£Á§¼Çµ¿¾È binary log¿¡ ´ëÇØ sql¹®À» Àâ°íÀÖ´Â Äɽ¬»çÀÌÁî

Å« ´ÙÁß¹® Æ®·£Á§¼ÇÀ» ºó¹øÈ÷ »ç¿ëÇÑ´Ù¸é, ÀÌ »çÀÌÁ ³ô°ÔÀâ¾Æ ÆÛÆ÷¸Õ½º¸¦ Áõ°¡½Ãų¼öÀÖ´Ù

ÀÚ¼¼ÇÑ °ÍÀº BEGIN/COMMIT/ROLLBACK Syntax¸¦ ÂüÁ¶Ç϶ó



character_set

µðÆúÆ® ¹®ÀÚ¼Â(ÇöÀç ¼¼ÆÃÇÑ)



character_sets

Áö¿øÇÏ´Â ¸ðµç ¹®ÀÚ¼Â



concurrent_inserts

µðÆúÆ®·Î onµÇ¾îÀÖÀ¸¸é mysqlÀº selectÇÏ´Â µ¿¾È¿¡ µ¿½Ã¿¡ myisamÅ×ÀÌºí¿¡ insert¸¦ »ç¿ëÇÒ ¼öÀÖµµ·ÏÇÑ´Ù

½ÃÀ۽à off·Î ÇÏ·Á¸é --safe or --skip-new·Î ÇØÁÖ¾î¾ß ÇÑ´Ù



connect_timeout

mysqld server°¡ Bad handshake¿¡ ¹ÝÀÀÇϱâÀü ¿¬°áµÈ ÆÐŶ¿¡ ´ëÇØ ±â´Ù¸®´Â ½Ã°£(ÃÊ)



datadir

mysql µ¥ÀÌŸ°¡ µé¾îÀִ Ȩµð·ºÅ丮



delay_key_write

(µðÆúÆ®·Î )onµÇ¾îÀÖÀ¸¸é mysqlÀº delay_key_write optionÀ» Å×À̺í»ý¼º¿¡ honor(??)ÇÑ´Ù

ÀÌ ¿É¼Ç°ú ÇÔ²² Å×ÀÌºí¿¡ ´ëÇÑ key buffer´Â ¸ðµç À妽º update½Ã¿¡ flushÇÏÁö ¾Ê°í Å×À̺íÀÌ Àá°ÜÁú¶§¸¸ flushÇÑ´Ù

ÀÌ°ÍÀº key°¡ ¸¹À»¶§ ¾²±â ¼Óµµ¸¦ ³ôÀÏ ¼öÀÖÀ¸³ª, À̸¦ »ç¿ëÇÏ·Á¸é myisamchk --fast --forceÇÔ²² ¸ðµç Å×ÀÌºí¿¡ ÀÚµ¿ üũ¸¦

Ãß°¡ÇÏ¿©¾ß ÇÑ´Ù. mysqld¸¦ --delay-key-write-for-all-tables optionÀ¸·Î ½ÃÀÛÇϸé, ¸ðµç Å×À̺íµéÀÌ ¸¶Ä¡ the delay_key_write option

À¸·Î »ý¼ºµÈ °ÍÀ¸·Î Ãë±ÞµÈ´Ù.

mysqld¸¦ --skip-new or --safe-mode·Î ½ÃÀÛÇÔÀ¸·Î½á ÀÌ·± flag¸¦ ¾ø¾Ù¼ö ÀÖ´Ù.





delayed_insert_limit

delayed_insert_limit rows¸¦ »ðÀÔÇÑ ÈÄ¿¡ INSERT DELAYED handler´Â ¾î¶°ÇÑ select¹®µéÀÌ ÇØ°áµÇÁö ¾Ê¾Ò´ÂÁö üũÇÑ´Ù

¸¸¾à ÇØ°áµÇÁö¾ÊÀº select¹®µéÀÌ ÀÖ´Ù¸é ½ÇÇàÇÑ´Ù.



delayed_insert_timeout

INSERT DELAYED thread´Â ¾ó¸¶³ª ¿À·¡µ¿¾È Á¾·áµÇ±âÀü insert¹®µéÀ» ±â´Ù·Á¾ß ÇÏ´ÂÁö¸¦ ³ªÅ¸³½´Ù.



delayed_queue_size

INSERT DELAYED¸¦ ó¸®Çϴµ¥ ÇÒ´çµÈ rowsÀÇ queue»çÀÌÁî

queue°¡ Ç®µÇ¸é INSERT DELAYED¸¦ ÇàÇϴ Ŭ¶óÀ̾ðÆ®´Â queue¿¡ ´Ù½Ã ¿©À¯°¡ »ý±æ¶§±îÁö ±â´Ù¸± °ÍÀÌ´Ù.



flush

--flush optionÀ¸·Î ½ÃÀÛµÈ mysqlÀº onÀ¸·Î Ç¥½ÃµÈ´Ù



flush_time

non-zero value·Î ¼¼ÆÃµÇ¸é ¸Å¹ø flush_time½Ã ¸ðµç Å×À̺íÀÌ ´ÝÈ÷´Â °ÍÀ» ±â´Ù¸°´Ù.(µð½ºÅ©¿¡ resources and sync things¸¦ ºñ¿ì±â À§ÇØ)

ÀÛÀº ¸®¼Ò½º¸¦ °¡Áö´Â Win95, Win98¿¡¼­ ÀÌ·¯ÇÑ ¿É¼ÇÀ» »ç¿ëÇϱ⸦ ÃßõÇÑ´Ù.



ft_min_word_len

FULLTEXT index¿¡ Æ÷ÇÔµÈ ÃÖ¼Ò¹®ÀÚ±æÀÌ

ÀÌ °ªÀ» ¹Ù²ÛÈÄ¿¡´Â FULLTEXT index¸¦ Àç»ý¼ºÇؾ߸¸ ÇÑ´Ù



ft_max_word_len

FULLTEXT index¿¡ Æ÷ÇÔµÈ ÃÖ´ë¹®ÀÚ±æÀÌ

ÀÌ °ªÀ» ¹Ù²ÛÈÄ¿¡´Â FULLTEXT index¸¦ Àç»ý¼ºÇؾ߸¸ ÇÑ´Ù



ft_max_word_len_sort

REPAIR, CREATE INDEX, or ALTER TABLE¿¡¼­ ºü¸¥ Àε¥½º Àç»ý¼º¿¡ »ç¿ëµÇ´Â FULLTEXT indexÀÇ ÃÖ´ë¹®ÀÚ±æÀÌ

¹®ÀÚ±æÀÌ°¡ ±æ¸é ±æ¼ö·Ï ´Ê°Ô insertµÈ´Ù.

thumb±ÔÄ¢Àº ´ÙÀ½°ú °°´Ù.

ft_max_word_len_sort¸¦ Áõ°¡½Ãų¶§ mysqlÀº temporary filesÀ» ´õÅ©°Ô »ý¼ºÇÏ°í(µû¶ó¼­, disk I/O·Î ÀÎÇØ ÇÁ·Î¼¼½º°¡ ÁÙ¾îµç´Ù)

one sort block¿¡ ´õÀûÀº keys¸¦ µÑ°ÍÀÌ´Ù(ÀÌ°ÍÀº È¿À²¼ºÀ» ÀúÇϽÃŲ´Ù)

ft_max_word_len_sort°¡ ³Ê¹« ÀÛÀ» ¶§, ´ë½Å mysqlÀº À妽º¿¡ ¸¹Àº ´Ü¾îµéÀ» õõÈ÷ insertÇÏÁö¸¸, ªÀº ´Ü¾îµéÀº ¸Å¿ì ºü¸£°Ô ÀÔ·ÂÇÑ´Ù.

ÀÌ°ÍÀº ´ÜÁö EPAIR, CREATE INDEX, or ALTER TABLEµ¿¾È À妽º¸¦ À缺½Ã Àû¿ëµÈ´Ù



ft_boolean_syntax

List of operators´Â MATCH ... AGAINST(... IN BOOLEAN MODE)ÀÇÇØ Áö¿øµÈ´Ù. MySQL Full-text SearchÂüÁ¶



have_innodb

InnoDB tablesÀ» Áö¿øÇÒ ½Ã¿¡ YES°¡ µÇ°í, --skip-innodb»ç¿ëÇϸé disalbedµÈ´Ù



have_bdb

Berkeley DB tablesÀ» Áö¿øÇÒ ½Ã¿¡ YES°¡ µÇ°í, --skip-bdb»ç¿ëÇϸé disalbedµÈ´Ù



have_raid

mysqld°¡ RAID optionÀ» Áö¿øÇϸé YES



have_openssl

mysqlÀÌ the client/server protocol»ó¿¡¼­ SSL (encryption:¾Ïȣȭ)¸¦ Áö¿øÇϸé YES·Î ³ªÅ¸³­´Ù



init_file

¼­¹ö¸¦ ½ÃÀÛÇÒ¶§ --init-file option¸¦ ÁöÁ¤ÇÒ ¶§ ³ªÅ¸´Â ÆÄÀÏ À̸§

¼­¹ö°¡ ½ÃÀ۽ÿ¡ ÀÌÆÄÀÏÀ» ½ÇÇàÇϱ⸦ ¿øÇÏ´Â sql¹® ÆÄÀÏÀÌ´Ù



interactive_timeout

¼­¹ö°¡ closeÀü¿¡ »óÈ£ÀÛ¿ëÇÒ Ä¿³Ø¼Ç¿¡ activity¸¦ ±â´Ù¸®´Â ½Ã°£(ÃÊ)

»óÈ£ÀÛ¿ëÇϴ Ŭ¶óÀ̾ðÆ®´Â mysql_real_connect()¿¡ CLIENT_INTERACTIVE option¸¦ »ç¿ëÇϴ Ŭ¶óÀ̾ðÆ®·Î Á¤ÀǵȴÙ

wait_timeout¸¦ ÂüÁ¶Ç϶ó



join_buffer_size

À妽º¸¦ »ç¿ëÇÏÁö¾Ê´Â full Á¶Àο¡ »ç¿ëµÇ´Â ¹öÆÛ»çÀÌÁî

ÀÌ ¹öÆÛ´Â µÎ°³ÀÇ Å×À̺í»çÀÌ¿¡ °¢°¢ÀÇ fullÁ¶Àο¡ ´ëÇÑ À¯ÀÏÇÑ ½Ã°£ÀÌ ÇÒ´çµÈ´Ù

À妽º¸¦ Ãß°¡ÇÏ´Â °ÍÀÌ ºÒ°¡´ÉÇÒ¶§ ´õ ºü¸¥ fullÁ¶ÀÎÀ» ÇϱâÀ§ÇØ Áõ°¡½ÃÄѶó

º¸Åë ºü¸¥ Á¶ÀÎÀ» ¼öÇàÇÏ´Â ÃÖ»óÀÇ ¹æ¹ýÀº À妽º¸¦ Ãß°¡ÇÏ´Â °ÍÀÌ´Ù



key_buffer_size

À妽º ºí·°Àº ¸ðµç ¾²·¹µå¿¡ÀÇÇØ ¿ÏÈ­µÇ¾îÁö°í °øÀ¯µÇ¾îÁø´Ù.

key_buffer_size´Â À妽ººí·°¿¡ »ç¿ëµÇ¾îÁö´Â ¹öÆÛ»çÀÌÁîÀÌ´Ù.

À妽º¸¦ ´õ Àß ´Ù·ç±âÀ§ÇØ Çã¿ëµÈ ¸¸Å­ ¸¹ÀÌ ÀÌ°ÍÀ» Áõ°¡½ÃÄѶó.

256M¿¡ 64M¸¦ ÇÒ´çÇÏ´Â °ÍÀÌ ÁÖ·Î mysql¿¡¼­ ÀϹÝÈ­ µÇ¾îÀÖ´Ù.

ÇÏÁö¸¸,´ç½ÅÀÇ ½Ã½ºÅÛÀÇ 50% ÀÌ»ó Ä¿Áø´Ù¸é, ½Ã½ºÅÛÀÌ ÆäÀÌ¡Çϸ鼭 ±²ÀåÈ÷ ´À·ÁÁø´Ù.

mysqlÀÌ µ¥ÀÌŸ¸¦ Àдµ¥ Äɽ¬ÇÏÁö ¾Ê±â ¶§¹®¿¡ show status¿Í show varibles¸¦ »ç¿ëÇÏ¿©

Key_read_requests, Key_reads, Key_write_requests, Key_writes¸¦ °Ë»çÇÏ°í key bufferÀÇ ÆÛÆ÷¸Õ½º¸¦ üũÇÏ´Â °ÍÀ» ¸í½ÉÇ϶ó.

Key_reads/Key_read_requestÀ²Àº º¸Åë 0.01º¸´Ù À۾ƾßÇÑ´Ù.

updates/deletes¸¦ ´ëºÎºÐ »ç¿ëÇÑ´Ù¸é Key_write/Key_write_requests°¡ 1¿¡ °¡±î¿öÁö´Â°Ô ÀϹÝÀûÀÌ°í,

µ¿½Ã¿¡ update¸¦ ¸¹ÀÌÇϰųª delay_key_write¸¦ »ç¿ëÇÑ´Ù¸é Key_write/Key_write_requests´Â ÀÛ¾ÆÁø´Ù.

¡Ø±âº»Àº 16MÀÌ´Ù.

Key_buffer_used*1024(byte)¿¡ 2~3¹è¸é ÃæºÐÇÏ´Ù(Åõ´úÀÌ´Ô)



SHOW Syntax¸¦ ÂüÁ¶Ç϶ó

µ¿½Ã¿¡ ¸¹Àº rows¸¦ ¾²°ÔÇÏ·Á¸é LOCK TABLES¸¦ »ç¿ëÇ϶ó

LOCK TABLES/UNLOCK TABLES Syntax¸¦ ÂüÁ¶Ç϶ó



language

¿¡·¯¸Þ¼¼Áö¿¡ »ç¿ëµÇ´Â ¾ð¾î



large_file_support

big file support·Î mysqlÀÌ ÄÄÆÄÀϵÇÀ»¶§



locked_in_memory

mysqld´Â --memlock·Î ¸Þ¸ð¸®¿¡ lockµÈ´Ù¸é on



log

½ÃÀ۽à --log·Î ¸ðµç Äõ¸®¸¦ loggingÇϸé on



log_update

½ÃÀ۽à --update-logÇϸé on



log_bin

½ÃÀ۽à binary log¸¦ Çϸé



log_slave_updates

If the updates from the slave should be logged.



long_query_time

ÇϳªÀÇ Äõ¸®°¡ long_query_time(ÃÊ)º¸´Ù ±æ¸é, Slow_queries counter°¡ Áõ°¡µÉ °ÍÀÌ´Ù

½ÃÀ۽à --log-slow-queries¸¦ »ç¿ëÇϸé, Äõ¸®´Â slow query logfile¿¡ ½×ÀδÙ

The Slow Query Log¸¦ ÂüÁ¶Ç϶ó



lower_case_table_names

Å×À̺íÀ̸§¿¡ 1·Î ¼¼ÆõǸé, µð½ºÅ©¿¡ lowercase(Àμâ)µÇ¾î ½×À̸ç, Å×À̺íÀ̸§Àº case-insensitiveµÉ °ÍÀÌ´Ù

Case Sensitivity in Names¸¦ ÂüÁ¶Ç϶ó



max_allowed_packet

ÆÐŶÀÇ ÃÖ´ë»çÀÌÁî

ÀÌ message¹öÆÛ´Â net_buffer_length bytes¿¡ ÃÖ±âÈ­µÈ´Ù.

ÇÏÁö¸¸, ÇÊ¿ä½Ã max_allowed_packet bytes±îÁö Áõ°¡ÇÑ´Ù. °¡´ÉÇÑ À߸øµÈ Å« ÆÐŶÀ» Àâ±âÀ§ÇØ µðÆúÆ®´Â ÀÛ´Ù

biggest BLOB¸¦ »ç¿ëÇϱ⸦ ¿øÇϸé ÀÌ°ÍÀ» Áõ°¡½ÃÄÑ¾ß Çϸç, ´ç½ÅÀÌ »ç¿ëÇϱ⠿øÇÏ´Â ¸¸Å­ Ä¿Áø´Ù.

The protocol limits for max_allowed_packetÀº MySQL 3.23¿¡¼­´Â 16MÀÌ°í, MySQL 4.0¿¡¼­´Â 4GÀÌ´Ù



max_binlog_cache_size

multi-statement transaction°¡ max_binlog_cache_sizeÀÇ ¸Þ¸ð¸®¾çº¸´Ù Å« ¸Þ¸ð¸®¸¦ ¿äûÇϸé

¿¡·¯°¡ ¹ß»ý





max_binlog_size

3.23.33ÀÌÈÄ¿¡¼­ °¡´ÉÇϸç, ÁÖ¾îÁø °ªº¸´Ù ÃÊ°úµÇ¾î binary (replication) log¿¡ ¾²´Â °ÍÀº log°¡ rotateµÈ´Ù

1024bytesº¸´Ù À۰ųª 1Gbytesº¸´Ù Å©°Ô ÇÒ ¼ö¾øÀ¸¸ç, µðÆúÆ®´Â 1GbytesÀÌ´Ù



max_connections

µ¿½ÃÀ¯Àú ¼ö

ÀÌ °ªÀÌ mysqld¿¡¼­ ¿ä±¸ÇÏ´Â file descriptorsÀÇ ¼ö¸¦ Áõ°¡Çϸé ÀÌ °ªÀ» Áõ°¡½ÃÄѶó

file descriptor limits¿Í Too many connections Error¸¦ ÂüÁ¶Ç϶ó



¡Ø±âº» °ªÀº 100ÀÌ´Ù. Åõ´úÀÌ´Ô¿¡ ÀÇÇϸé max_userd_connectionsÀÇ µÎ¹èÁ¤µµ°¡ ÀûÁ¤ÇÏ´Ù°í ÇÑ´Ù





max_connect_errors

È£½ºÆ®·Î ºÎÅÍ interrupted connections¼ö°¡ ¸¹¾ÆÁö¸é, ÀÌ È£½ºÆ®´Â ¸¹¾ÆÁø ¼öºÎÅÍ blockµÉ °ÍÀÌ´Ù.

FLUSH HOSTS¸¦ »ç¿ëÇÏ¿© unblockÇÒ ¼öÀÖ´Ù.



max_delayed_threads

INSERT DELAYED statements¸¦ ´Ù·ç±â À§ÇØ ¾²·¹µå¼öµéº¸´Ù ´õ ¸¹ÀÌ ½ÃÀÛ½ÃÅ°Áö ¸¶¶ó.

¸ðµç INSERT DELAYED threads°¡ »ç¿ëµÇ¾îÁø ÀÌÈÄ »õ·Î¿î Å×ÀÌºí¿¡ µ¥ÀÌŸ¸¦ ÀԷ½ÃÅ°¸é,

±× row´Â ¸¶Ä¡ DELAYED attributeÀÌ ÁöÁ¤µÇÁö ¾ÊÀº°Íó·³ ÀÔ·ÂµÉ °ÍÀÌ´Ù.



max_heap_table_size

Don\t allow creation of heap tables bigger than this.

¿©±â¿¡¼­ Á¤ÀÇ µÇ¾îÁø °Íº¸´Ù ´õÅ« Å×À̺íÀ» heap¿¡ ¸¸µéÁö ¸øÇÑ´Ù



max_join_size

max_join_size ·¹ÄÚµåµéº¸´Ù ´õ Å«°ÍµéÀ» ÀÐÀ¸·Á Á¶ÀÎÀ» »ç¿ëÇÏ´Â °ÍÀº ¿¡·¯¸¦ ¹ß»ý½ÃŲ´Ù.

whereÀýÀÌ ¾ø°í, ¿À·¡°É¸®´Â Á¶Àΰú ¸¹Àº(¼ö¹é¸¸)rows¸¦ ¹ÝȯÇÏ·Á´Â À¯Àú°¡ ÀÖÀ¸¸é ÀÌ°ÍÀ» ¼¼ÆÃÇ϶ó





max_sort_length

BLOB or TEXT values¸¦ Á¤·ÄÇÒ¶§ »ç¿ëµÇ´Â ¼ö(bytes)

(only the first max_sort_length bytes of each value are used; the rest are ignored).



max_user_connections

ÇϳªÀÇ À¯Àú´ç È°¼ºÈ­µÈ Ä¿³Ø¼Ç¼ö(0 = no limit).



max_tmp_tables

(This option doesn\t yet do anything.)

Ŭ¶óÀ̾ðÆ®°¡ µ¿½Ã¿¡ ¿­¼öÀÖ´Â ÀÓ½ÃÅ×À̺íÀÇ ÃÖ´ë¼ö



max_write_lock_count

After this many write locks, allow some read locks to run in between.





myisam_bulk_insert_tree_size

MySQLÀº bulk inserts¸¦ ÇϱâÀ§ÇØ Æ¯º°ÇÑ Æ®¸®±¸Á¶ÀÇ Äɽ¬¸¦ »ç¿ëÇÑ´Ù

(¿¹: INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., and LOAD DATA INFILE)

ÀÌ°ÍÀº ¾²·¹µå´ç bytes¿¡ Äɽ¬ Æ®¸® »çÀÌÁ Á¦ÇÑÇÑ´Ù.

0À¸·Î ¼¼ÆÃÇϸé ÀÌ ÃÖÀûÈ­´Â disableµÈ´Ù

µðÆúÆ®´Â 8MBÀÌ´Ù



myisam_recover_options

--myisam-recover option¸¦ »ç¿ëÇÏ¿´À»¶§



myisam_sort_buffer_size

REPAIR¸¦ »ç¿ëÇÏ´Â À妽º¸¦ Á¤·ÂÇϰųª CREATE INDEX or ALTER TABLE°ú ÇÔ²² À妽º¸¦ ¸¸µé¶§ ÇÒ´çµÇ´Â ¹öÆÛ»çÀÌÁî



myisam_max_extra_sort_file_size

fast index creation¸¦ À§ÇØ temporary file¸¦ »ý¼ºÇÏ´Â °ÍÀÌ key cacheº¸´Ù ´õ Ä¿Áø´Ù¸é key cache method°¡ ¿ì¼±ÇÑ´Ù

ÀÌ°ÍÀº À妽º¸¦ »ý¼ºÇϱâÀ§ÇØ slower key cache method¸¦ »ç¿ëÇÏ´Â large tables¿¡¼­ long character keys¿¡ ÁÖ·Î »ç¿ëµÈ´Ù

ÀÌ parameter´Â MbytesÀÌ´Ù



myisam_max_sort_file_size

temporary fileÀº ÃÖ´ë»çÀÌÁî´Â À妽º(mysqlÀÌ REPAIR, ALTER TABLE or LOAD DATA INFILEµ¿¾È)¸¦

Àç»ý¼ºÇÏ´Â µ¿¾È »ç¿ëµÇµµ·Ï Çã¶ôÇÑ´Ù.

ÆÄÀÏ»çÀÌÁî´Â À̰ͺ¸´Ù ´õ Ŭ°ÍÀ̸ç, À妽º´Â slower key cache¸¦ ÅëÇØ »ý¼ºµÉ °ÍÀÌ´Ù.

ÀÌ parameter´Â MbytesÀÌ´Ù



net_buffer_length

communication buffer´Â Äõ¸®»çÀÌ¿¡ ÀÌ »çÀÌÁ ´Ù½Ã ¼¼ÆÃÇÏ¿©¾ß ÇÑ´Ù

net_buffer_length°¡ º¸Åë ¹Ù²îÁö´Â ¾ÊÁö¸¸, ´ç½ÅÀÌ ¸Å¿ì ÀÛÀº ¸Þ¸ð¸®¸¦ °¡Áö°í ÀÖ´Ù¸é

ÀÌ°ÍÀ» ±â´ëµÈ Äõ¸®»çÀÌÁ ¼¼ÆÃÇÒ ¼öÀÖ´Ù.

(Ŭ¶óÀ̾ðÆ®¿¡ ÀÇÇØ º¸³»Áø sql¹®ÀÇ ±â´ëµÈ ±æÀÌÀÌ´Ù. sql¹®ÀÌ ÀÌ ±æÀ̸¦ ÃÊ°úÇÑ´Ù¸é,

¹öÆÛ´Â max_allowed_packet±îÁö ÀÚµ¿ÀûÀ¸·Î Ä¿Áø´Ù)



net_read_timeout

ÀбⰡ ¾ÈµÇ±âÀü Ä¿³Ø¼ÇÀ¸·Î ºÎÅÍ ´õ ¸¹Àº µ¥ÀÌŸ¸¦ ±â´Ù¸®´Â ½Ã°£(ÃÊ)

Ä¿³Ø¼ÇÀ¸·ÎºÎÅÍ µ¥ÀÌŸ¸¦ ±â´ëÇÏÁö ¾ÊÀ»¶§´Â ÀÌ Å¸ÀӾƿôÀº rite_timeoutÀ¸·Î Á¤ÀǵȴÙ

lave_read_timeoutÂüÁ¶Ç϶ó





net_retry_count

communication port¿¡ ÀбⰡ ¹æÇصȴٸé, ÀÌ°ÍÀº Æ÷±âÇϱâÀü¿¡ ¸¹Àº ¼ö¸¦ Àç½ÃµµÇÑ´Ù.

ÀÌ°ÍÀº internal interrupts°¡ ¸ðµç ¾²·¹µå¿¡ º¸³»ÁüÀ¸·Î½á FreeBSD¿¡¼­ ²Ï ³ô°Ô ³ªÅ¸³­´Ù





net_write_timeout

blockÀÌ ¾²±â¸¦ ȸÇÇÇϱâÀü¿¡ Ä¿³Ø¼Ç¿¡ ¾²¿©Áö±â¸¦ ±â´Ù¸®´Â ½Ã°£(ÃÊ)



open_files_limit

ÀÌ °ªÀÌ \0\À̸é mysqld´Â max_connections*5

¶Ç´Â max_connections + table_cache*2 (whichever is larger) number of filesÀÌ ÇÊ¿äÇÏ´Ù

mysqld°¡ \Too many open files\¿¡·¯¸¦ ³ªÅ¸³»¸é ÀÌ °ªÀ» Áõ°¡½ÃÄÑ¾ß ÇÑ´Ù.

open_files_limit \0\ÀÌ ¾Æ´Ï¸é mysqld´Â file descriptors°¡ setrlimit()¸¦ »ç¿ëÇϵµ·Ï ¹Ù²Ù±âÀ§ÇØ ÀÌ°ÍÀ» »ç¿ëÇÑ´Ù

open_files_limit \0\À̸é, mysqld´Â max_connections*5



pid_file

--pid-file pid ÆÄÀÏÀ§Ä¡



port

mysqlÆ÷Æ®³Ñ¹ö (µðÆúÆ® 3306)



protocol_version

The protocol version used by the MySQL server.



record_buffer

ÀÏ·ÃÀÇ ¿¬¼ÓÀûÀÎ ½ºÄµÀ» ÇÏ´Â °¢°¢ÀÇ ¾²·¹µå´Â ¾²·¹µå°¡ ½ºÄµÇÏ´Â ¹öÆÛ»çÀÌÁ ÇÒ´çÇÑ´Ù

¸¹Àº ¿¬¼ÓÀûÀÎ ½ºÄµÀ» ÇÒ°æ¿ì ÀÌ°ªÀ» Áõ°¡½ÃÅ°±â¸¦ ¿øÇÒ ¼öÀÖ´Ù.



record_rnd_buffer

Á¤·ÄµÈ ¼ø¼­´ë·Î rows¸¦ ÀÐÀ»¶§ rows´Â µð½ºÅ©Ã£±â¸¦ ÇÏÁö¾Ê°í ÀÌ ¹öÆÛ¸¦ ÅëÇØ Àд´Ù

¼¼ÆÃÇسõÁö¾ÊÀ¸¸é record buffer¿¡¼­ ¼¼ÆõȰªÀÌ´Ù



query_buffer_size

Äõ¸®¹öÆÛÀÇ Ãʱâ ÇÒ´ç

´ëºÎºÐÀÇ Äõ¸®°¡ (like when inserting blobs) ±æ´Ù¸é ÀÌ°ªÀ» Áõ°¡½ÃÄѾ߸¸ ÇÑ´Ù





safe_show_databases

À¯Àú°¡ ¾î¶² µ¥ÀÌŸº£À̽º±ÇÇѵµ Å×À̺íÀÇ ±ÇÇѵµ °¡ÁöÁö ¾Ê´Â µ¥ÀÌŸº£À̽º¸¦ º¸¿©ÁÖÁö ¸¶¶ó

ÀÌ°ÍÀº ¸¸¾à ´ç½ÅÀÌ ´Ù¸¥ À¯ÀúµéÀÌ °¡Áö°í ÀÖ´Â µ¥ÀÌŸº£À̽º¸¦ º¼ ¼öÀÖ´Â »ç¶÷µé¿¡ ´ëÇØ °ÆÁ¤ÇÑ´Ù¸é º¸¾ÈÀ» Çâ»ó½Ãų¼öÀÖ´Ù

skip_show_databases¸¦ ÂüÁ¶Ç϶ó



server_id

--server-id optionÀÇ °ª



skip_locking

¸¸¾à mysqld°¡ ¿ÜºÎ lockÀ» »ç¿ëÇÑ´Ù¸é offÀÌ´Ù



skip_networking

local(socket)Ä¿³Ø¼Ç¸¸À» Çã¶ôÇÑ´Ù¸é onÀÌ´Ù



skip_show_databases

PROCESS_PRIV±ÇÇÑÀ» °¡ÁöÁö ¾Ê´Â »ç¶÷µéÀÌ SHOW DATABASES¸¦ ¸øÇÏ°Ô ÇÑ´Ù

¸¸¾à »ç¶÷µéÀÌ ´Ù¸¥ À¯ÀúµéÀÌ °¡Áö°íÀÖ´Â µ¥ÀÌŸº£À̽º¸¦ º¸´Â °ÍÀ» °ÆÁ¤ÇÑ´Ù¸é ÀÌ°ÍÀº º¸¾ÈÀ» Çâ»ó½ÃŲ´Ù

safe_show_databasesÂüÁ¶



slave_read_timeout

ÀбⰡ ½ÇÆÐÇϱâÀü master/slave¿¬°á·Î ºÎÅÍ ´õ ¸¹Àº µ¥ÀÌÅ͸¦ ±â´Ù¸± ¼öÀÖ´Â ½Ã°£(ÃÊ)



slow_launch_time

¾²·¹µå »ý¼ºÀÌ ÀÌ °ªº¸´Ù ´õ ±æ´Ù¸é(ÃÊ´ç), Slow_launch_threads counter´Â Áõ°¡µÉ °ÍÀÌ´Ù





socket

¼­¹ö¿¡ ÀÇÇØ »ç¿ëµÇ´Â Unix socket /[Àý´ë°æ·Î]/À̸§



sort_buffer

Á¤·ÄÀ» ÇÊ¿ä·Î ÇÏ´Â °¢ ¾²·¹µå´Â ¹öÆÛ»çÀÌÁ ÇÒ´çÇÑ´Ù.

´õ ºü¸¥ ORDER BY or GROUP BY operations¸¦ À§Çؼ­ ÀÌ °ªÀ» Áõ°¡½ÃÄѶó.

section A.4.4 Where MySQL Stores Temporary Files¸¦ ÂüÁ¶Ç϶ó



¡Øsort_buffer¿Í record_buffer

sort_buffer¿Í record_bufferÀÇ ÇÕÀÌ 8M°¡ ³ÑÁö ¾Êµµ·Ï ÁÖÀÇÇÑ´Ù

(sort_buffer+record_buffer)*max_connections°¡ ÀÚ½ÅÀÇ ·¥º¸´Ù Å©Áö ¾Êµµ·ÏÇØ¾ß ÇÑ´Ù.



table_cache

¸ðµç ¾²·¹µåµé¿¡ ´ëÇÑ ¿ÀÇÂÇÒ ¼öÀÖ´Â Å×ÀÌºí ¼ö

ÀÌ °ªÀ» Áõ°¡½ÃÅ°¸é mysqld°¡ ÇÊ¿ä·Î ÇÏ´Â ÆÄÀÏ descriptorsÀÇ ¼ö¸¦ Áõ°¡½ÃŲ´Ù.

Opened_tables variable¸¦ üũÇÔÀ¸·Î¼­ Å×À̺íÄɽ¬¸¦ Áõ°¡½ÃÅ°°ÍÀÌ ÇÊ¿äÇÑÁö üũÇÒ ¼öÀÖ´Ù.

SHOW Syntax¸¦ ÂüÁ¶Ç϶ó

ÀÌ °ªÀÌ Å©°í FLUSH TABLES°¡ ¸¹Áö¾Ê´Ù¸é(¸ðµç Å×À̺íµéÀ» ´Ý°í Àç¿ÀÇÂÇϵµ·Ï °­¿äÇÏ´Â °Í) ±×¶§, ÀÌ°ªÀ» Áõ°¡½ÃÄÑ¾ß ÇÑ´Ù

Å×À̺íÄɽ¬¿¡ ´õ ¸¹Àº Á¤º¸¸¦ ¾òÀ¸·Á¸é How MySQL Opens and Closes Tables¸¦ ÂüÁ¶Ç϶ó



¡ØÀÌ°ÍÀº Åõ´úÀÌ´Ô¿¡ ÀÇÇϸé mysql¼­¹ö°¡ Çѹø¿¡ ¿­¼öÀÖ´Â Å×ÀÌºí ¼ö¶ó°í ÇÑ´Ù

±âº»°ªÀº 64Àε¥, max_connectionsÀÇ 1.5¹èÁ¤µµ Å©±â·Î Çϴ°ÍÀÌ ÁÁ´Ù°í ÇÑ´Ù.





table_type

µðÆúÆ® Å×À̺í ŸÀÔ(myisam)



thread_cache_size

Äɽ¬¸¦ Àç»ç¿ëÇϱâÀ§ÇØ ¾ó¸¶³ª ¸¹Àº ¾²·¡µå¸¦ À¯ÁöÇؾßÇϴ°¡

Ŭ¶óÀ̾ðÆ®°¡ ¿¬°áÀÌ ²÷°åÀ» ¶§, ±× Ŭ¶óÀ̾ðÆ®ÀÇ ¾²·¡µå´Â ÀÌÀüº¸´Ù ´õ ¸¹Àº thread_cache_size ¾²·¹µå°¡ Á¸ÀçÇÏÁö ¾Ê´Â´Ù¸é

Äɽ¬¿¡ ³õ¿©Áø´Ù.

¸ðµç »õ·Î¿î ¾²·¹µåµéÀº ¸ÕÀú Äɽ¬¿¡¼­ ³ª¿À¸ç, ´ÜÁö Äɽ¬°¡ ºñ¾îÀÖÀ»´ë »õ·Î¿î ¾²·¹µå¸¦ »ý¼ºÇÑ´Ù.

ÀÌ °ªÀº »õ·Î¿î ¿¬°áÀÌ ¸¹À» °æ¿ì ¼º´ÉÇâ»óÀ» À§ÇØ Áõ°¡½ÃÅ°°Ô µÈ´Ù.

º¸Åë ÀÌ°ÍÀº ÁÁÀº ¾²·¹µå¼öÇàÀ» °¡Áø´Ù¸é ÇöÀúÇÑ ¼º´ÉÇâ»óÀ» ÁÖÁö´Â ¾Ê´Â´Ù.

connection°ú threds_created»çÀÌ¿¡ Â÷À̸¦ ¾Ë±âÀ§Çؼ­´Â ÇöÀçÀÇ ¾²·¹µå Äɽ¬°¡ ´ç½Å¿¡°Ô ¾ó¸¶³ª È¿°úÀûÀÎÁö ¾Ë ¼öÀÖ´Ù.



thread_concurrency

¼Ö¶ó¸®½º¿¡¼­, mysqld´Â ÀÌ °ª°ú thr_setconcurrency()¸¦ È£ÃâÇÒ °ÍÀÌ´Ù.

thr_setconcurrency()´Â application¿¡°Ô ¾²·¹µå½Ã½ºÅÛ¿¡°Ô µ¿½Ã¿¡ ½ÇÇàµÇµµ·Ï ¿øÇÏ´Â ¾²·¹µå¼ö¿¡ ´ëÇÑ ÈùÆ®¸¦ ÁØ´Ù







thread_stack

°¢ ¾²·¹µå¿¡ ´ëÇÑ ½ºÅûçÀÌÁî

the crash-me test¿¡ ÀÇÇØ ¹ß°ßµÈ ÇÑ°èÄ¡

µðÆúÆ®´Â normal operation¿¡ ´ëÇØ ÃæºÐÈ÷ Å©´Ù.

MySQL Benchmark Suite¸¦ ÂüÁ¶Ç϶ó



timezone

µðºñ¼­¹ö ŸÀÓ Á¸



tmp_table_size

¸Þ¸ð¸®¾È¿¡ temporary tableÀÌ ÀÌ »çÀÌÁ ÃÊ°úÇϸé mysqlÀº ÀÚµ¿ÀûÀ¸·Î temporary tableÀ» µð½ºÅ©¿¡ MyISAM tableÀ¸·Î

º¯È¯ÇÒ °ÍÀÌ´Ù. ´ç½ÅÀÌ ¸¹Àº advanced GROUP BY queries°ú ¸¹Àº ¸Þ¸ð¸®¸¦ °¡Áö°í ÀÖ´Ù¸é ÀÌ °ªÀ» Áõ°¡½ÃÄѶó





tmpdir

temporary files °ú temporary tables¸¦ »ç¿ëÇÒ ¼öÀÖ´Â µð·ºÅ丮



version

mysql¼­¹ö ¹öÁ¯



wait_timeout

¼­¹ö¸¦ ´ÝÈ÷±âÀü¿¡ ¿¬°áÀ» È°¼ºÈ­Çϴµ¥ ¼­¹ö°¡ ±â´Ù¸®´Â ½Ã°£(ÃÊ)

interactive_timeout¸¦ ÂüÁ¶Ç϶ó

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















¢¹ mysqladmin -u root -p extended-status(¡Ømysql>show stauts)

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

Aborted_clients

Ŭ¶óÀ̾ðÆ®°¡ ¿¬°áÀ» ÀûÀýÈ÷ ´ÝÁö¾Ê¾Æ¼­ Á×¾ú±â¶§¹®¿¡ ²÷¾îÁø ¿¬°á¼ö

Communication Errors / Aborted Connection¸¦ ÂüÁ¶



Aborted_connects

¿¬°á½ÇÆÐµÈ mysql¼­¹ö¿¡ ¿¬°á½Ãµµ ¼ö

Communication Errors / Aborted ConnectionÂüÁ¶



Bytes_received

¸ðµç Ŭ¶óÀ̾ðÆ®·Î ºÎÅÍ ¹ÞÀº ¹ÙÀÌÆ® ¼ö



Bytes_sent

¸ðµç Ŭ¶óÀ̾ðÆ®¿¡°Ô º¸³½ ¹ÙÀÌÆ®¼ö



Connections

mysql¼­¹ö¿¡ ¿¬°á½ÃµµÇÑ ¼ö



Created_tmp_disk_tables

sql¹®À» ½ÇÇàÇÏ´Â µ¿¾È »ý¼ºµÈ µð½ºÅ©¿¡ Á¸ÀçÇÏ´Â ÀÓ½ÃÅ×ÀÌºí ¼ö



Created_tmp_tables

sql¹®À» ½ÇÇàÇÏ´Â µ¿¾È »ý¼ºµÈ ¸Þ¸ð¸®¿¡ Á¸ÀçÇÏ´Â ÀÓ½ÃÅ×ÀÌºí ¼ö



Created_tmp_files

¾ó¸¶³ª ¸¹Àº ÀÓ½ÃÆÄÀÏÀ» mysqld°¡ »ý¼ºÇߴ°¡



Delayed_insert_threads

»ç¿ëÁßÀÎ insert handler threads°¡ Áö¿¬µÇ°í ÀÖ´Â ¼ö



Delayed_writes

INSERT DELAYED·Î ¾²¿©Áø rows¼ö



Delayed_errors

¾î¶² ¿¡·¯(duplicate key·ÎÀÎÇÑ ¶§¹®¿¡ INSERT DELAYED·Î ¾²¿©Áø rows¼ö



Flush_commands

ÃÊ°ú flush¸í·É¼ö



Handler_delete

Å×À̺í·Î ºÎÅÍ Áö¿öÁø rows¼ö



Handler_read_first

À妽º·Î ºÎÅÍ ÀÐÇôÁø óÀ½ entry¼ö

ÀÌ°ÍÀÌ ³ôÀ¸¸é ¼­¹ö´Â ¸¹Àº full index scans¸¦ ÇÏ°í ÀÖ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù

¿¹¸¦ µé¾î SELECT col1 FROM foo´Â col1Àº À妽ºµÇ¾ú´Ù´Â °ÍÀ» ÃßÁ¤ÇÑ´Ù.



Handler_read_key

Å°°¡ Á¸ÀçÇÏ´Â row¸¦ Àд ¿äû¼ö

ÀÌ°ÍÀÌ ³ôÀ¸¸é ´ç½ÅÀÇ Äõ¸®¿Í Å×À̺íÀÌ ÀûÀýÈ÷ À妽ºÈ­µÇ¾ú´Ù´Â ÁÁÀº ÁöÀûÀ̵ȴÙ.



Handler_read_next

Å°¼ø¼­´ë·Î ´ÙÀ½ row¸¦ Àд ¿äû¼ö

ÀÌ°ÍÀº ¸¸¾à range constraint¿Í ÇÔ²² À妽ºÄ÷³À» Äõ¸®ÇÒ °æ¿ì ³ô¾ÆÁú °ÍÀÌ´Ù.

ÀÌ°ÍÀº ¶ÇÇÑ À妽º ½ºÄµÇÏ¸é ³ô¾ÆÁú °ÍÀÌ´Ù



Handler_read_rnd

°íÁ¤µÈ À§Ä¡¿¡ Á¸ÀçÇÏ´Â row¸¦ Àд ¿äû¼ö

ÀÌ°ÍÀº °á°ú¸¦ Á¤·ÄÇϱ⸦ ¿äÇÏ´Â ¸¹Àº Äõ¸®¸¦ ÇÑ´Ù¸é ³ô¾ÆÁú °ÍÀÌ´Ù



Handler_read_rnd_next

µ¥ÀÌŸÆÄÀÏ¿¡¼­ ´ÙÀ½ row¸¦ Àб⸦ ¿äû¼ö

ÀÌ°ÍÀº ¸¹Àº Å×ÀÌºí ½ºÄµÀ» ÇÏ¸é ³ô¾ÆÁú °ÍÀÌ´Ù

ÀϹÝÀûÀ¸·Î ÀÌ°ÍÀº ´ç½ÅÀÇ Å×À̺íµéÀÌ ÀûÀýÇÏ°Ô À妽ºµÇÁö ¾Ê¾Ò°Å³ª ´ç½ÅÀÇ Äõ¸®µéÀÌ

´ç½ÅÀÌ °¡Áö°í ÀÖ´Â À妽ºµéÀÇ ÀÌÁ¡À» È°¿ëÇÏÁö ¸øÇÏ°í ÀÖ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù



Handler_update

Number of requests to update a row in a table.

ÇÑÅ×ÀÌºí¿¡ ÇÑ row¸¦ ¾÷µ¥ÀÌÆ®¸¦ ¿äûÇÏ´Â ¼ö



Handler_write

Number of requests to insert a row in a table.

ÇÑÅ×ÀÌºí¿¡ ÇÑ row¸¦ insert¿äûÇÏ´Â ¼ö



Key_blocks_used

The number of used blocks in the key cache.

keyÄɽ¬¿¡¼­ ºí·°À» »ç¿ëÇÏ´Â ¼ö



Key_read_requests

Äɽ¬¿¡¼­ Å°ºí·°À» Àб⸦ ¿äûÇÏ´Â ¼ö



Key_reads

µð½ºÅ©·ÎºÎÅÍ Å°ºí·°À» ¹°¸®ÀûÀ¸·Î Àд ¼ö



Key_write_requests

The number of requests to write a key block to the cache.

Äɽ¬¿¡¼­ Å°ºí·°À» ¾²±âÀ§ÇØ ¿äûÇÏ´Â ¼ö



Key_writes

The number of physical writes of a key block to disk.

µð½ºÅ©¿¡ Å°ºí·°À» ¹°¸®ÀûÀ¸·Î ¾²´Â ¼ö



Max_used_connections

µ¿½Ã»ç¿ë ¿¬°á ÃÖ´ë¼ö



Not_flushed_key_blocks

Å°Äɽ¬¿¡¼­ Å°ºí·°ÀÌ ¹Ù²îÁö¸¸ µð½ºÅ©¿¡´Â ¾ÆÁ÷ flushµÇÁö ¾Ê´Â´Ù



Not_flushed_delayed_rows

Number of rows waiting to be written in INSERT DELAY queues.

INSERT DELAY queue¿¡¼­ ¾²¿©Áö±â¸¦ ±â´Ù¸®´Â row¼ö



Open_tables

ÇöÀç ¿ÀÇÂµÈ Å×À̺í¼ö



Open_files

ÇöÀç ¿ÀÇÂµÈ ÆÄÀϼö



Open_streams

ÁÖ·Î logging¿¡ »ç¿ëµÇ´Â ÇöÀç ¿ÀÇÂµÈ stream¼ö



Opened_tables

Áö±Ý±îÁö ¿ÀÇÂµÈ Å×ÀÌºí ¼ö



Select_full_join

Å°¾øÀÌ Á¶ÀÎµÈ ¼ö(0ÀÌ µÇ¾î¾ß¸¸ ÇÑ´Ù)



Select_full_range_join

reference table¿¡¼­ range search¸¦ »ç¿ëÇÑ Á¶Àμö



Select_range

ù¹ø° Å×ÀÌºí¿¡ range¸¦ »ç¿ëÇß´ø Á¶Àμö

º¸Åë ÀÌ°ÍÀÌ Å©´õ¶óµµ À§ÇèÇÏÁø ¾Ê´Ù



Select_scan

ù¹ø° Å×À̺íÀ» ½ºÄµÇß´ø Á¶Àμö



Select_range_check

°¢ rowÈÄ¿¡ key usage¸¦ üũÇÑ Å°¾øÀÌ Á¶ÀÎÇÑ ¼ö(0À̾î¾ß¸¸ ÇÑ´Ù)



Questions

¼­¹ö¿¡¼­ º¸³½ Äõ¸®¼ö

Slave_open_temp_tables

ÇöÀç slave thread¿¡ ÀÇÇØ ¿ÀÇÂµÈ Àӽà Å×ÀÌºí ¼ö



Slow_launch_threads

¿¬°áµÈ slow_launch_timeº¸´Ù ´õ ¸¹Àº ¼ö¸¦ °®´Â ¾²·¹µå¼ö



Slow_queries

long_query_timeº¸´Ù ´õ ¸¹Àº ½Ã°£ÀÌ °É¸®´Â Äõ¸® ¼ö

Slow Query LogÂü°í



Sort_merge_passes

Á¤·ÄÇؾ߸¸ ÇÏ´Â merge¼ö

ÀÌ °ªÀÌ Å©¸é sort_buffer¸¦ Áõ°¡Çϴ°Ϳ¡ ´ëÇØ °í·ÁÇؾßÇÑ´Ù



Sort_range

Number of sorts that where done with ranges.



Sort_rows

Á¤·ÄµÈ row¼ö



Sort_scan

Å×ÀÌºí ½ºÄµ¿¡ ÀÇÇØ ÇàÇØÁø Á¤·Ä¼ö



Table_locks_immediate

Áï½Ã ȹµæµÈ Å×À̺í lock ½Ã°£ (3.23.33ºÎÅÍ Ãß°¡µÈ Ç׸ñ)



Table_locks_waited

Áï½Ã ȹµæµÇÁö ¾Ê°í ±â´Ù¸²ÀÌ ÇÊ¿äÇÑ Å×À̺í lock ½Ã°£

ÀÌ°ÍÀÌ ³ô¾ÆÁö¸é ¼º´É¿¡ ¹®Á¦°¡ ÀÖÀ¸¹Ç·Î, ¸ÕÀú Äõ¸®¸¦ ÃÖÀûÈ­ ½ÃÅ°°í, Å×À̺íÀ» ºÐ»ê½ÃÅ°°Å³ª º¹Á¦¸¦ »ç¿ëÇؾßÇÑ´Ù

(3.23.33ºÎÅÍ Ãß°¡µÈ Ç׸ñ)



Threads_cached

½º·¹µå ij½¬¿¡¼­ ¾²·¹µå ¼ö



Threads_connected

ÇöÀç ¿ÀÇÂµÈ ¿¬°á¼ö



Threads_created

¿¬°áÀ» ´Ù·ç±âÀ§ÇØ »ý¼ºµÈ ¾²·¹µå ¼ö



Threads_running

sleepingÇÏÁö ¾Ê´Â ¾²·¹µå ¼ö



Uptime

¼­¹ö°¡ ½ºÅ¸Æ®µÈ ÈÄ·Î Áö±Ý±îÁöÀÇ ½Ã°£



[Âü°í]

1. Opened_tables°¡ Å©¸é table_cache variableÀÇ °ªÀÌ ³Ê¹« ÀÛÀº°ÍÀÏÁöµµ ¸ð¸¥´Ù

2. key_reads°¡ Å©¸é key_cachÀÇ °ªÀÌ ³Ê¹« ÀÛÀº°ÍÀÏÁöµµ ¸ð¸¥´Ù

3. cache hit rateÀº key_reads/key_read_requestsÀÌ´Ù

4. Handler_read_rnd°¡ Å©¸é MySQLÀÇ ¸ðµç Å×À̺íÀ» ½ºÄµÇÏ´Â ¸¹Àº Äõ¸®°¡ Àִٰųª

key¸¦ ÀûÀýÈ÷ »ç¿ëÇÏÁö ¾Ê´Â Á¶ÀεéÀÌ ÀÖÀ»Áö ¸ð¸¥´Ù

5. Threads_created°¡ Å©¸é thread_cache_size°ªÀ» Áõ°¡½ÃÅ°±â¸¦ ¹Ù¶ö¼öµµ ÀÖ´Ù

6. Created_tmp_disk_tablesÀÌ Å©¸é µð½ºÅ©´ë½Å ÀÓ½ÃÅ×À̺í¸Þ¸ð¸®¸¦ ¾ò±âÀ§ÇØ

tmp_table_size°ªÀ» Áõ°¡½ÃÅ°±â¸¦ ¿øÇÒ ¼öÀÖ´Ù

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





[Æ©´×ÂüÁ¶ 1]

¡Ø ±âº»ÀûÀ¸·Î support-files¹Ø¿¡ `my-huge.cnf\, `my-large.cnf\, `my-medium.cnf\, `my-small.Ãâ

¸¦ ±âº»À¸·Î my.cnf ·Î ¹Ù²Ù¾î »ç¿ëÇϸ鼭 Á¶Á¤ÇÑ´Ù.



1. memory (>=256M)ÀÌ°í

¸¹Àº Å×À̺íÀÌ ÀÖÀ¸¸ç, Àû´çÇÑ Å¬¶óÀ̾ðÆ®¼ö¿¡¼­ ÃÖ°í ¼º´ÉÀ» À¯ÁöÇϱâ À§ÇØ

shell> safe_mysqld -O key_buffer=64M -O table_cache=256 \

-O sort_buffer=4M -O record_buffer=1M &

ÀÌ·¯ÇÑ ¿É¼ÇÀ¸·Î ¼­¹ö¸¦ ½ÇÇàÇϴµ¥, my-cnf¿¡¼­ À̸¦ ¼öÁ¤ÇÏ¿© »ç¿ëÇÏ¸é µÉ °ÍÀÌ´Ù.



2. 128M¸Þ¸ð¸®¿¡ Å×À̺íÀÌ ÀûÁö¸¸, Á¤·ÄÀÌ ¸¹À» ¶§

shell> safe_mysqld -O key_buffer=16M -O sort_buffer=1M



3. ¸Þ¸ð¸®´Â ÀûÁö¸¸ ¸¹Àº ¿¬°áÀÌ ÀÖÀ» ¶§

shell> safe_mysqld -O key_buffer=512k -O sort_buffer=100k \

-O record_buffer=100k &

¶Ç´Â



shell> safe_mysqld -O key_buffer=512k -O sort_buffer=16k \

-O table_cache=32 -O record_buffer=8k -O net_buffer=1K &



[Æ©´× ÂüÁ¶2]

¡Øgroup by¿Í order byÀÛ¾÷ÀÌ °¡Áö°í ÀÖ´Â ¸Þ¸ð¸®º¸´Ù ÈξÀ Ŭ °æ¿ì, Á¤·Ä ÈÄ row Àд °ÍÀ» ºü¸£°Ô

ÇϱâÀ§ÇØ record_rnd_buffer°ªÀ» Áõ°¡½ÃÄѶó



¡Ø¸¹Àº ¿¬°á·Î ÀÎÇÑ swapping problems´Â ¸Þ¸ð¸®¸¦ ¿Ã·Á¾ß µÇ´Â °ÍÀº ´ç¿¬ÇÏ´Ù



¡Ø¸¸¾à Æ©´×À» À§ÇØ parameter¸¦ ¹Ù²Ù°í ±× È¿°ú¿¡ ´ëÇØ ¾Ë¾Æº¼·Á¸é

shell> mysqld -O key_buffer=32m --help

¸¦ »ç¿ëÇϸéµÈ´Ù. ÁÖÀÇÇÒÁ¡Àº --help¸¦ ³ªÁß¿¡ ºÙ¿©¾ß ÇÑ´Ù´Â °ÍÀÌ´Ù.



¡Ømysqladmin -u root -p -i5 -r extended-status | grep -v \0\

Enter password:

+--------------------------+-------+

| Variable_name | Value |

+--------------------------+-------+

| Bytes_received | 38 |

| Bytes_sent | 55 |

| Connections | 2 |

| Flush_commands | 1 |

| Handler_read_first | 1 |

| Handler_read_rnd_next | 13 |

| Open_files | 1 |

| Opened_tables | 6 |

| Questions | 1 |

| Table_locks_immediate | 5 |

| Threads_created | 1 |

| Threads_connected | 1 |

| Threads_running | 1 |

| Uptime | 5 |

+--------------------------+-------+



¢ºBytes_received:

¸ðµç Ŭ¶óÀ̾ðÆ®·Î ºÎÅÍ ¹ÞÀº ¹ÙÀÌÆ® ¼ö

¢ºBytes_sent:

¸ðµç Ŭ¶óÀ̾ðÆ®¿¡°Ô º¸³½ ¹ÙÀÌÆ®¼ö

¢ºConnections:

mysql¼­¹ö¿¡ ¿¬°á½ÃµµÇÑ ¼ö

¢ºFlush_commands:

ÃÊ°ú flush¸í·É¼ö

¢ºHandler_read_first:

À妽º·Î ºÎÅÍ ÀÐÇôÁø óÀ½ entry¼ö

ÀÌ°ÍÀÌ ³ôÀ¸¸é ¼­¹ö´Â ¸¹Àº full index scans¸¦ ÇÏ°í ÀÖ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù

¿¹¸¦ µé¾î SELECT col1 FROM foo´Â col1Àº À妽ºµÇ¾ú´Ù´Â °ÍÀ» ÃßÁ¤ÇÑ´Ù.

¢ºHandler_read_rnd_next:

µ¥ÀÌŸÆÄÀÏ¿¡¼­ ´ÙÀ½ row¸¦ Àб⸦ ¿äû¼ö

ÀÌ°ÍÀº ¸¹Àº Å×ÀÌºí ½ºÄµÀ» ÇÏ¸é ³ô¾ÆÁú °ÍÀÌ´Ù

ÀϹÝÀûÀ¸·Î ÀÌ°ÍÀº ´ç½ÅÀÇ Å×À̺íµéÀÌ ÀûÀýÇÏ°Ô À妽ºµÇÁö ¾Ê¾Ò°Å³ª ´ç½ÅÀÇ Äõ¸®µéÀÌ

´ç½ÅÀÌ °¡Áö°í ÀÖ´Â À妽ºµéÀÇ ÀÌÁ¡À» È°¿ëÇÏÁö ¸øÇÏ°í ÀÖ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù

¢ºOpen_files:

ÇöÀç ¿ÀÇÂµÈ ÆÄÀϼö

¢ºOpened_tables:

ÇöÀç ¿ÀÇÂµÈ Å×À̺í¼ö

¢ºQuestions:

¼­¹ö½ÃÀÛÈÄ Áö±Ý±îÁö ¿äûµÈ Äõ¸®¼ö

¢ºTable_locks_immediate:

Áï½Ã ȹµæµÈ Å×À̺í lock ½Ã°£ (3.23.33ºÎÅÍ Ãß°¡µÈ Ç׸ñ)

¢ºThreads_created:

¿¬°áÀ» ´Ù·ç±âÀ§ÇØ »ý¼ºµÈ ¾²·¹µå ¼ö

¢ºThreads_connected:

ÇöÀç ¿ÀÇÂµÈ ¿¬°á¼ö

¢ºThreads_running:

sleepingÇÏÁö ¾Ê´Â ¾²·¹µå ¼ö

¢ºUptime :

¼­¹ö°¡ ½ºÅ¸Æ®µÈ ÈÄ·Î Áö±Ý±îÁöÀÇ



°ü·Ã °Ô½Ã¹° : 1 (Total 1 Articles)
¹ø È£ Á¦ ¸ñ ±Û¾´ÀÌ ÀÛ¼ºÀÏ Á¶È¸¼ö ¼± ÅÃ
1  mysqladmin ÃÑÁ¤¸® linux04-03-23590