Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
mysqlの最大クエリサイズは? 長すぎるクエリを起動すると、サーバーが動作しなくなることがあります。
現在のサーバー設定は次の方法で確認できます。
SHOW VARIABLES LIKE 'max_allowed_packet';
これにより、答えがバイト単位で得られます。たとえばmax_allowed_packet=1048576、または1 MiB
max_allowed_packet=1048576
1 MiB
を増やすにはmax_allowed_packet、 を開きます
max_allowed_packet
my.ini/my.cnfセクションの下[mysqld]。
my.ini/my.cnf
[mysqld]
変更が完了したら、サーバーを再起動する必要があります。