mysql "Too many connections"

tinydancer·2021년 8월 3일
0

java.sql.SQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"
: 연결된 클라이언트 수가 일정수치 이상일 경우

mysql Server8.0 > bin
mysql -u root -p
password 입력

연결할 수 있는 최대 클라이언트 갯수 확인

mysql> show variables like '%max_connect%';

지속시간 확인

mysql> show variables like 'wait_timeout';

현재상태 확인

mysql> show status like '%CONNECT%';

connection size 500으로 증가

mysql> set global max_connections=500; (151에서 500으로)


  • mysql 재시작 할 경우 다시 151이 됨. 주의할 것.

설정파일을 바꿔보기.

mysql> show variables where variable_name like "%dir";

datadir 의 경로에 들어가면(C:/ProgramData/MYSQL SERVER8.0) my.ini파일이 있다.
관리자권한으로 열어서 여기서 max_connections 값을 바꿔보기.

0개의 댓글