title: How can I see / change MySQL connection timeout settings?
body: <p>I have a Java program. When I log in, after ~600,000 milliseconds (I actually tried several times, and it is always ~600,000. That is why I think there is somewhere set up a timeout for 600,000 miliseconds.) My database connection crashes and my program no longer works (it always needs to be connected to database). It gives me <code>Communication link failure</code> error. I Here are my mysql connection settings:</p>
  <pre><code>import java.sql.*;
  import javax.swing.*;
  public class mysqlconnect {
      Connection conn = null;
      public static Connection ConnectDb()    {
          try{
              Class.forName(&quot;com.mysql.jdbc.Driver&quot;);
              Connection conn = DriverManager.getConnection(&quot;jdbc:mysql://server_name/database_name&quot;,&quot;user_name&quot;,&quot;user_password&quot;);
              return conn;
          }catch (Exception e) {
              JOptionPane.showMessageDialog(null, &quot;Cant connect to db&quot;);
              return null;
          }
      }
  }
  </code></pre>
  <p>I tried adding <code>?autoReconnect=true</code> &amp; <code>tcpKeepAlive</code> to my code, but no luck. Is there any way to go to phpmyadmin and change some setting there (increase the timeout time)?</p>