What is maximum query size for mysql? Some times the server stops working when I fire a too long query.
mysql的最大查询大小是多少?有时,当我触发一个太长的查询时,服务器会停止工作。
2 个解决方案
#1
131
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
这将以字节为单位给出答案。为e。g max_allowed_packet = 1048576或1 mb
#2
22
To increase the max_allowed_packet
, open
要增加max_allowed_packet,请打开。
my.ini/my.cnf
under [mysqld]
section.
下my.ini / my . cnf中所做(mysqld)部分。
Once the change is done you would have to restart the server.
一旦更改完成,您将不得不重新启动服务器。
#1
131
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
这将以字节为单位给出答案。为e。g max_allowed_packet = 1048576或1 mb
#2
22
To increase the max_allowed_packet
, open
要增加max_allowed_packet,请打开。
my.ini/my.cnf
under [mysqld]
section.
下my.ini / my . cnf中所做(mysqld)部分。
Once the change is done you would have to restart the server.
一旦更改完成,您将不得不重新启动服务器。