Linux
Mysql 3.23.58 Max 커넥션 튜닝
CHOMAN
2015. 6. 10. 14:33
아직도 Mysql 3.23.58 쓰는 사람들이 많다..ㅋ
mysql 3.23.58 버전은 my.cnf 에 max_connections = 512 와 같이 옵션 값을 주고 재시작시 mysql 시작하지 못함.
--> 이 방법은 mysql 4.0 이상에서만 통용되는 것임.
1) mysql 3.23.58 버전에서는 /etc/my.cnf 에 값을 넣는 것이 아니라
mysql 데몬 시작시 아래와 같이 옵션 값을 주어 시작하여야 합니다.
--> OS 재설치시 이점 참고하시기 바랍니다.
/etc/init.d/mysql 134라인에 다음과 같이 MAX 값 512 로 설정해드림.
$bindir/safe_mysqld --datadir=$datadir -O max_connections=512 --pid-file=$pid_file &
2) mysql 콘솔에서 설정된 max connections 값 확인
show variables like '%max_connections%';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 512 |
+-----------------+-------+
1 row in set (0.00 sec)