java - How to keep Active remote Connections in MySQL Database? -
i have java application has remote access in online mysql database, , works fine.
the problem after few minutes, connection server closed, there anyway keep connection active? won't have instantiate connection perform task.
any ideas , inputs appreciated. in advance.
you need auto reconnect, try editing jdbc url:
jdbc:mysql://[host]:[port]/[database]?autoreconnect=true
see connector reference: http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html
Comments
Post a Comment