MySQL Keeps Dropping the Connection
If adjusting the Keep Alive settings via the Edit->Preferences menu does not
solve the problem, MySQL does provide several JDBC properties to allow the
user to set the connection timeout, socket timeout, and auto reconnect
properties of the MySQL JDBC driver. Listed below is some information about how
to connect to MySQL with these properties set.
1. Click the "Add Connection Profile" button or select DB Tools - Add Connection Profile in RazorSQL.
2. Select MySQL as the database type and JDBC as the connection type.
3. Enter the following information:
Profile Name: <the name you want the connection described as>
Driver Location: <browse to the location of the MySQL JDBC driver>
Driver Class: com.mysql.jdbc.Driver (assumes the use of the MySQL Connector/J driver)
Login: <your login id>
Password: <your password>
JDBC URL: jdbc:mysql://<host>:<port>/<database_name>? connectTimeout=0&socketTimeout=0&autoReconnect=true
autoReconnect should only be set to true if using the other connection properties does not solve the problem.
Replace <host> with the ip address or name of the server. Replace <port> with the port. The default is 3306. Replace <database_name> with the name of the database if applicable
Here is a link with some information about the properties in the JDBC URL: