Monday, June 22, 2020

com.mysql.jdbc.PacketTooBigException: Packet for query is too large + Spring boot 2..

I share solution next error on Linux or windows, in my case i try save video on database, i get that error.

Update file my.cnf (linux) or my.ini (windows).

1. Go to path installation mysql

cd YOUR_PATH_INSTALLATION/mysql/bin/

#Linux
sudo nano my.cnf

#Windows console or anywhere editor, in this example i use console.
notepad my.ini

#Change next line, for default is 10M, i set 100M
max_allowed_packet = 100M


2. Stop or restart mysql.


3. conect by console mysql.

mysql -u your_user -p your_passoword

4. run next command for check max allowed packet.

SHOW VARIABLES LIKE 'max_allowed_packet';

and try again.



No comments:

Post a Comment

Virtual Threads in Java 21: Simplified Concurrency for Modern Applications

  With Java 21, Virtual Threads have redefined how we approach concurrency, offering a lightweight and efficient way to handle parallel and ...