I have a big problem! when I do this:
String query = \"SELECT * FROM utente WHERE confermato=1 and Username=\'\" + username
+ \"\' AND Password
I had the same misleading error message.
I fixed it by changing my port number to 3306. Previously I had the port number set as 2083 because that's what I use on my web server.
Edit your my.cnf(ubunut) or my.ini(windows) file and set max_allowed_packet size.
max_allowed_packet=512M
Then restart your mysql server.It will work
If you are unable to stop your database, you can alternatively set the value of the max allowed packet parameter dynamically. To do so:
1. Log in as a root user.
2. You'll need to set the value as an integer, rather than '256M'. 256M is equivalent to 256*1024*1024, or 268435456.
3. mysql> SET GLOBAL max_allowed_packet=268435456;
4. To check that this has been applied:
a. Relogin to your mysql client.
b. mysql> SELECT @@max_allowed_packet;
Restart your Confluence instance.
You will still need to update your /etc/my.cnf file as described in the method above to make the change persistent.