본문 바로가기

기술자료/기술운영자료

MySQL 설정값 적용 노 셧다운

 블로그>뜨바...일이 점점 커지네...쌍!~ | 밤톨아빠

 http://blog.naver.com/eukyworld/60155176223

MySQL 설정값 튜닝시 직접 적용하는 방법입니다. 

변수들을 설정하는것인데 방법은 다음과 같습니다.

   

 mysql> show variables;
+---------------------------------+----------------------------------------+
| Variable_name                   | Value                                  |
+---------------------------------+----------------------------------------+
| auto_increment_increment        | 1                                      |
| auto_increment_offset           | 1                                      |
<중략>

| version                         | 5.0.77-log                             |
| version_comment                 | Source distribution                    |
| version_compile_machine         | i686                                   |
| version_compile_os              | pc-linux-gnu                           |
| wait_timeout                    | 28800                                  |
+---------------------------------+----------------------------------------+
231 rows in set (0.00 sec)

mysql> set SESSION wait_timeout=180;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables;
+---------------------------------+----------------------------------------+
| Variable_name                   | Value                                  |
+---------------------------------+----------------------------------------+
| auto_increment_increment        | 1                                      |
| auto_increment_offset           | 1                                      |
<중략>

| version                         | 5.0.77-log                             |
| version_comment                 | Source distribution                    |
| version_compile_machine         | i686                                   |
| version_compile_os              | pc-linux-gnu                           |
| wait_timeout                    | 180                                    |
+---------------------------------+----------------------------------------+
231 rows in set (0.00 sec)

mysql>

   

물론 설정후 my.cnf에 적용하는게 맞게지요!~

위에서 설정하는건 임시 방편이고 DB 재시작하게 되면 날라가니까요!~