[英]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我正在使用 DBeaver 使用来自 Godaddy Business Shared Hosting 的 SSH 隧道转储数据库,但是当 mysqldump 进程停止以显示此错误时:mysqldump:错误 2013:在查询时在查询期间丢失与 MySQL 服务器的连接:17856 行转储表
abs_attendance
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
在导出配置中,我添加了额外的命令参数:--no-tablespaces 但没有更改相同的错误显示
See the result of SELECT @@max_allowed_packet;查看SELECT @@max_allowed_packet的结果; and change it
并改变它
max_allowed_packet 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.
数据包消息缓冲区使用 net_buffer_length 中的值进行初始化,但可以增长到 max_allowed_packet 字节。 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.
设置为最大的 BLOB,为 1024 的倍数。如果更改此值,也应在客户端更改。 See slave_max_allowed_packet for a specific limit for replication purposes.
有关复制目的的特定限制,请参阅 slave_max_allowed_packet。
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.几乎每个 MySQL/MariaDB 版本的默认值都不同。
You also can add options to your mysqldump so that they limit the lines per insert.您还可以向 mysqldump 添加选项,以便它们限制每次插入的行数。
Like喜欢
mysqldump --skip-extended-insert --net_buffer_length=50000 myschema > yourfile.sql
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.