0

I have MySQL version 5.5. I want increase database packet size permanently.How can i store permanently packet size in mysql .

2 Answers2

1

Change in the my.ini file. Include the single line under [mysqld] in your file

max_allowed_packet=500M now restart the MySQL service and you are done.

See the documentation for the further information.....https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html

Programmer man
  • 393
  • 3
  • 14
0

You have two values of max_allowed_packet in MySQL :

one on the client side : [mysql] section, [mysqldump], [client] and more. one on the server side : [mysqld] section. The value of max_allowed_packet you see with the command show variables like 'max_allowed_packet'; is the one on the server side.

In order to increase this value, you must increase both sides : in your server configuration file ([mysqld] section in your my.ini file) and in your client configuration file (whether your [client] or [mysql] section in your my.ini file).

This setting can be changed on the server side without restarting the server if you have the SUPER privilege with this command : mysql> SET GLOBAL max_allowed_packet = numeric;.

Don't forget to change the 'numeric' value by a numeric value. Don't forget to change your configuration file too otherwise this value will be reset at reboot.

Rehash from old answer: https://dba.stackexchange.com/questions/45087/max-allowed-packet-in-mysql

Community
  • 1
  • 1