title: com.mysql.jdbc.PacketTooBigException
body: <p>I have a big problem!
  when I do this: </p>
  
  <pre><code> String query = "SELECT * FROM utente WHERE confermato=1 and Username='" + username
              + "' AND Password='" + password + "'";
  
          Class.forName("com.mysql.jdbc.Driver").newInstance();
          Connection con = DriverManager.getConnection("ind_server/nome_db","user","password");
  </code></pre>
  
  <p>Eclipse gives me this error:</p>
  
  <pre><code>Packet for query is too large (4739923 &gt; 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
  </code></pre>
  
  <p>So, first: this query is really so big? -.-
  after: which commands do I have to wrtite in the ssh?
  It' the first time I due with this things!
  thanks in advance!</p>
  
  <p>I don't have root privileges on the server!</p>
  
  <p>I tried using this:</p>
  
  <pre><code> mysql&gt;set global max_allowed_packet=32*1024*1024;
  </code></pre>
  
  <p>but it gives me this error: ERROR 1227 (42000): Access denied; you need the SUPER privilege for this operation</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Now I have modified the max_allowed_packet variable to 32MB. Stopped and restarted the server
  But eclipse gives me the same error!</p>
  
  <p>What can I do?</p>