What is maximum query size for mysql?

MysqlWamp

Mysql Problem Overview


What is maximum query size for mysql? Some times the server stops working when I fire a too long query.

Mysql Solutions


Solution 1 - Mysql

You can check your current server setting with:

SHOW VARIABLES LIKE 'max_allowed_packet';

This gives you the answer in bytes. for e.g max_allowed_packet=1048576 or 1 MiB

Solution 2 - Mysql

To increase the max_allowed_packet, open

my.ini/my.cnf under [mysqld] section.

Once the change is done you would have to restart the server.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHemal KachhadiyaView Question on Stackoverflow
Solution 1 - MysqlkiriloffView Answer on Stackoverflow
Solution 2 - Mysqluser2045846View Answer on Stackoverflow