Press enter to see results or esc to cancel.

Storage long text in MySQL

 

Packet Too Large

A communication packet is a single SQL statement sent to the MySQL server, a single row that is sent to the client, or a binary log event sent from a master replication server to a slave.

The largest possible packet that can be transmitted to or from a MySQL 5.5 server or client is 1GB.

When a MySQL client or the mysqld server receives a packet bigger than max_allowed_packet bytes, it issues an ER_NET_PACKET_TOO_LARGE error and closes the connection. With some clients, you may also get a Lost connection to MySQL server during query error if the communication packet is too large.

Both the client and the server have their own max_allowed_packet variable, so if you want to handle big packets, you must increase this variable both in the client and in the server.

 

  • https://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html
  • https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html
  • https://dev.mysql.com/doc/refman/5.7/en/memory-use.html
Comments

Leave a Comment