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

Integrating Google Cloud Pub/Sub with Terraform and Spring Boot 3 (Java 21)

Introduction In this blog post, I'll demonstrate how to provision Google Cloud Pub/Sub resources using Terraform and integrate them with...