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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -