Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql recovers the solution of automatic disconnection of oversized files

Shulou Source: shulou.com Published: 2022-06-01 16:41:01 10月01日 Update

Recently used backup file for mysqdump recovery, due to large data, it will automatically disconnect in 2 hours, so try the following settings to solve the problem

?

set global max_allowed_packet=100 000 000; set global net_buffer_length=100000; SET GLOBAL interactive_timeout=28800 000; SET GLOBAL wait_timeout=28800000

Explanation of the above statement:

max_allowed_packet=XXX Maximum size of buffer for client/server communication;

-net_buffer_length=XXX TCP/IP and socket communication buffer size, creating lines up to net_buffer_length

-interactive_timeout = 10; valid for subsequent interactive links;

-wait_timeout is valid for the current interactive link;

The above statement mainly solves: connection timeout, imported sql file is too large.

Tags: File valid size statement link communication maximum between backup socket client client hour childhood data server buffer length problem storage area Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Redmi Linux vpn Apple