MySQL upload file size is too large com.mysql.jdbc.PacketTooBigException

Source: Internet
Author: User
Tags mysql command line

The error message is as follows:
Com.mysql.jdbc.PacketTooBigException:Packet for query is too large (19485760 > 10485760). You can change this value on the server by setting the Max_allowed_packet ' variable.

Workaround 1:
You should set the value of "max_allowed_packet" as prompted.
Open the MySQL configuration file my.cnf (My.ini for Windows), and modify the following values.
Max_allowed_packet = 20M

Workaround 2:

Go to MySQL server on the MySQL command line run set global Max_allowed_packet = 20*1024*1024 exit the MySQL command line, and then log back in. Run command: Show VARIABLES like '%max_allowed_packet% '; see if Max_allowed_packet edits succeed

MySQL upload file size is too large com.mysql.jdbc.PacketTooBigException

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.