Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
mysql 접속시에 자꾸 아래와 같은 에러가 나서..
1 |
Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. |
context.xml의 설정을 아래와 같이 바꿔주니 해결된듯하다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://xxx.xxx.xxx.xxx:3306/dbname?characterEncoding=utf-8&interactiveClient=true&autoReconnect=true&autoReconnectForPools=true&useUnicode=true&characterSetResults=UTF-8" type="javax.sql.DataSource" name="jdbc/xxxxx" username="userid" password="userpw" initialSize="0" maxActive="20" maxIdle="10" minIdle="0" maxWait="-1" validationQuery="SELECT 1" testOnBorrow="true" poolPreparedStatements="true" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" loginTimeout="10" /> |