MySQL과 연동하여 개발 시 다음과 같은 에러가 발생하는 경우가 있다.

 

 Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (3004 > 2048). 
 You can change this value on the server by setting the max_allowed_packet' variable.; 
 nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: 

 

--> MySQL로 들어오는 패킷이 MySQL에 설정되어 있는 값 보다 큰 경우 발생

 

다음 2가지 방법 중 한가지로 해결 할 수 있다.

 

1. MySQL 설정 파일에 "max_allowed_packet=32M" 와 같이 패킷의 크기를 강제로 설정

리눅스 계열 - my.cnf

윈도우 - my.ini

 

-- > 재시작 필요

 

2. SET GLOBAL max_allowed_packet = 1048576; 실행

 

-- > 재시작 필요 없음, 그러나 추후 재시작 하면 해당 설정은 유효하지 않음

 

 

당장 급한 경우라면 2번을 먼저 해놓고 1번도 같이 작업을 해놓자. 언젠가는 MySQL도 재시작을

할 이슈가 있을테니...

1. 프로젝트 우클릭 -> Properties -> Java Build Path -> Add Library 클릭

 

2. Web App Libraries 선택 -> Next -> 적용할 프로젝트 선택

 

var event = jQuery.Event("keypress", {

    keyCode:13

});

$("#btn").trigger(event);

java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required

 

원인

SSL 미사용 에러

 

해결책

1. URL에 파라미터 추가

verifyServerCertificate=false&useSSL=false 또는 

verifyServerCertificate=false&useSSL=false

 

2. MySQL의 버전이 낮은 경우는 mysql-connector-java 버전을 낮추어서 사용하면 된다.

 

+ Recent posts