we recently are being confronted by an error which always occurs now when trying to create a dump of the database running on mysql Ver 8.0.40-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu 20.04)). This database is being used by Matomo. The error which always occurs is, sometimes the same/different tables and different rows:
mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `[TABLE]` at row: [ROW-number]
Mysqldump Command:
mysqldump --compression-algorithms=zlib --quick --single-transaction db_name.sql
We've tried different settings
[mysqld]
max_allowed_packet=2048M
wait_timeout = 86400
interactive_timeout = 86400
net_read_timeout=4800
net_write_timeout=4800
[mysqldump]
max_allowed_packet = 2048M
Also tried the suggestions from these sites:
mysqldump-Error-2013-Lost-connection-to-MySQL-server
and
This doesn't help. Does anybody have different solutions? Workarounds?
--single-transaction? Have you tried adding--skip-lock-tables?