I would like to ask about problem with mysqldump on Ubuntu 20.04 (I'm using DBeaver, but same problem is in all apps and also in dumping from console).

I found a few threads in discussions about this problem, but nothing helped me.

I'm able to dump DB from localhost (MySQL), but I'm not able to dump a MariaDB database from production. I tried to dump DBs from more hosts, but problem is the same: Error 2013

Here is a full DBeaver mysqldump response:

/usr/bin/mysqldump --column-statistics=0 --routines --add-drop-table --disable-keys --extended-insert -u myuser --host=myhost --port=3312 mydatabase
Task 'MySQL dump' started at Sat Apr 03 22:07:43 CEST 2021
mysqldump: Got error: 2013: Lost connection to MySQL server at 'reading final connect information', system error: 0 when trying to connect

Task 'MySQL dump' finished at Sat Apr 03 22:07:43 CEST 2021
2021-04-03 22:07:43.715 - IO error: Process failed (exit code = 2). See error log.
2021-04-03 22:07:43.716 - java.io.IOException: Process failed (exit code = 2). See error log.
    at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.validateErrorCode(AbstractNativeToolHandler.java:214)
    at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.executeProcess(AbstractNativeToolHandler.java:194)
    at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.doExecute(AbstractNativeToolHandler.java:254)
    at org.jkiss.dbeaver.ext.mysql.tasks.MySQLNativeToolHandler.doExecute(MySQLNativeToolHandler.java:47)
    at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.lambda$0(AbstractNativeToolHandler.java:60)
    at org.jkiss.dbeaver.runtime.RunnableContextDelegate.lambda$0(RunnableContextDelegate.java:39)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

mysqldump configuration:

max_allowed_packet    = 1024M

Thanks a lot for each help.

  • 1
    Screenshots of error text are not helpful. Take the entire error output, copy paste it as text into your question as an edit. Without the full text there's not enough information from the traceback to help you with debugging.
    – Thomas Ward
    Apr 3, 2021 at 19:51
  • Hi @ThomasWard thanks a lot for an answer, I updated the question with full DBeaver mysqldump response.
    – klaucode
    Apr 3, 2021 at 20:13

1 Answer 1


So, this is the relevant error:

mysqldump: Got error: 2013: Lost connection to MySQL server at 'reading final connect information', system error: 0 when trying to connect

What this means is that when MySQL Dump tool was connecting to the remote MySQL server, it failed to get the connection information from the server - either the remote MySQL bounced you out or it is not listening for external connections.

By default, MySQL Server and MariaDB do not listen for external connections. You have to configure them to listen for external connections (which has a whole host of security concerns you have to consider before doing so blindly!) before you can connect to remote servers/hosts with mysql or mysqldump or any tools that communicate on those protocols (DBeaver, DataGrip, etc.)

  • Thank you very much @Thomas Ward, but problem I think is not so trivial. I'm able to connect into the DB without any problems. But only mysqldump cannot connect. I tried to connect to another mariadb hosts, problem is the same. From Windows I'm able to conect and also dump without problems. ....but mysqldump to mysql localhost DB is working.
    – klaucode
    Apr 4, 2021 at 6:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .