com.mysql.jdbc.PacketTooBigException

前端 未结 9 1209
别那么骄傲
别那么骄傲 2020-11-30 13:08

I have a big problem! when I do this:

 String query = \"SELECT * FROM utente WHERE confermato=1 and Username=\'\" + username
            + \"\' AND Password         


        
9条回答
  •  臣服心动
    2020-11-30 14:02

    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.

提交回复
热议问题