Jump to content

[Solved] Unable To Export Database From Phpmyadmin


rahulawa

Recommended Posts

  • 2 weeks later...
  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

SQLException: Packet for query is too large (5526600 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.

SQLState: S1000

VendorError: 0



while establishing remote sql client with java

Edited by rahulawa
Link to comment
Share on other sites

Posted Today, 02:12 AM

I've already explained several times that I'm not usually awake at 2am. I've also explained that you should try to be more patient in the future. If you're having trouble understanding either of these points let me know and I'll try to find a better way to explain it.

 

The mysql max_allowed_packet is already set to 256 mb, which should be more than large enough for anyone, and not 1 mb like your error message shows. Googling your error though I found this https://stackoverflow.com/questions/13759418/com-mysql-jdbc-packettoobigexception which says that if you use the wrong connection string you can get that misleading error even though the max_allowed_packet is set correctly.

Link to comment
Share on other sites

Connection conn = null;
try {

 

conn=DriverManager.getConnection("jdbc:mysql://tommy.heliohost.org:2083/db?","user","pass");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select something from table");
while(rs.next())
{
System.out.println(rs.getInt(1));
}
// Do something with the Connection
} catch (SQLException ex) {
// handle any errors
System.out.println("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
System.out.println("VendorError: " + ex.getErrorCode());
}

 

is this connection is ok
because still the same error of packet too large
Edited by rahulawa
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...