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

Provisioning Cloud SQL with Private Service Connect Using Terraform & Accessing from Cloud Run with Spring Boot

In this post, we'll explore how to provision Cloud SQL instances with Private Service Connect (PSC) connectivity using Terraform and the...