问题
What is maximum query size for mysql? Some times the server stops working when I fire a too long query.
回答1:
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 1mb
回答2:
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.
来源:https://stackoverflow.com/questions/16335011/what-is-maximum-query-size-for-mysql