Skip to main content
1 of 2

Can't export MariaDB large table by mysqldump when row_format is compressed

I have a MariaDB 10.2.13 server. This server contains a database called 'factory'. This database contains a table called 'client'. This is a large table.

client table structure:

CREATE TABLE `client` (
  `id` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `name` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `lastname` longtext DEFAULT NULL,
  `age` int(11) NOT NULL,
  `address1` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `time` bigint(20) NOT NULL,
  `comment` longtext NOT NULL,
  `address2` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `product_idx1` (`address1`),
  KEY `product_idx3` (`address2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 

I wanted to export the table by the mysqldump instruction as follows:

mysqldump factory --quick --complete-insert --no-create-db --no-create-info --skip-extended-insert --compact --tables client --max_allowed_packet="3G" > dump_client.sql

Then I got the error message as follows:

mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `client` at row: 1002046

I was trying to check the record by the SELECT Statement as follows:

SELECT * from client limit 1002046,1'

Even though, I didn't see anything irregular in data. I think it is happening when ROW_FORMAT is COMPRESSED. I can't change the ROW_FORMAT because it's a requeriment.

What can I do for this case?