简体   繁体   中英

DBeaver Error 2013: Lost connection to MySQL. Why?

I'm using DBeaver to Dump database using SSH Tunnel from Godaddy Business Shared Hosting but while mysqldump the process stop to display this error : mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table abs_attendance at row: 17856

Why It display this error & How to fix it ? In Export Configuration i have added Extra command args: --no-tablespaces but no change same error display

See the result of SELECT @@max_allowed_packet; and change it

max_allowed_packet

Description: Maximum size in bytes of a packet or a generated/intermediate string. The packet message buffer is initialized with the value from net_buffer_length, but can grow up to max_allowed_packet bytes. Set as large as the largest BLOB, in multiples of 1024. If this value is changed, it should be changed on the client side as well. See slave_max_allowed_packet for a specific limit for replication purposes.

Commandline: --max-allowed-packet=#
Scope: Global, Session
Dynamic: Yes (Global), No (Session)
Data Type: numeric
Default Value:
16777216 (16M) >= MariaDB 10.2.4
4194304 (4M) >= MariaDB 10.1.7
1048576 (1MB) <= MariaDB 10.1.6
1073741824 (1GB) (client-side)
Range: 1024 to 1073741824

The DEFAULT Values are different for nearly each version of MySQL/MariaDB.

You also can add options to your mysqldump so that they limit the lines per insert.

Like

mysqldump --skip-extended-insert --net_buffer_length=50000 myschema > yourfile.sql

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM