MySQL max connections 설정

Jmnote (토론 | 기여)님의 2015년 6월 24일 (수) 15:45 판 (새 문서: ==확인== <source lang='cli'> mysql> show variables like 'max_connections'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 15...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 확인

mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+
1 row in set (0.00 sec)
mysql> show status like 'Max_used_connections';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Max_used_connections | 152   |
+----------------------+-------+
1 row in set (0.00 sec)

2 온라인 설정

  • 즉시 적용됨
mysql> set global max_connections=500;
Query OK, 0 rows affected (0.00 sec)

3 영구 설정

  • my.cnf에 max_connections 설정 추가
  • mysqld 재시작시에 적용됨
[root@zetadb ~]# vi /etc/my.cnf
[mysqld]
max_connections = 500

4 확인 2

mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 500   |
+-----------------+-------+
1 row in set (0.00 sec)
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}