3
    C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe --host=localhost --port=3306 -u root nd7b265_rahetbally
Task 'MySQL script' started at Sun May 31 09:53:09 MST 2020
ERROR 2013 (HY000) at line 118827: Lost connection to MySQL server during query
Task 'MySQL script' finished at Sun May 31 09:53:13 MST 2020
2020-05-31 09:53:13.363 - IO error: Process failed (exit code = 1). See error log.
2020-05-31 09:53:13.363 - java.io.IOException: Process failed (exit code = 1). See error log.
    at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.executeProcess(AbstractNativeToolHandler.java:182)
    at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.doExecute(AbstractNativeToolHandler.java:237)
    at org.jkiss.dbeaver.tasks.nativetool.AbstractNativeToolHandler.lambda$0(AbstractNativeToolHandler.java:52)
    at org.jkiss.dbeaver.runtime.RunnableContextDelegate.lambda$0(RunnableContextDelegate.java:39)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Amira Elsayed Ismail
  • 9,216
  • 30
  • 92
  • 175

5 Answers5

6

Just change connection setting from --host=localhost to --host=127.0.0.1.

It works for me.

vuklip
  • 79
  • 1
  • 7
2

Via right click DB > SQL editor > New SQL script

Execute following queries:

set global net_buffer_length=1000000; 
set global max_allowed_packet=1000000000;

https://stackoverflow.com/a/18979736

S. vanh.
  • 101
  • 5
0

OutOfMemoryError usually occurs when the Java Virtual Machine (JVM) has run out of memory to allocate. To fix this issue in DBeaver, you can try increasing the memory allocated to the JVM.

Locate the dbeaver.ini file:

On Windows, it's in the DBeaver installation directory (e.g., C:\Program Files\DBeaver). On macOS, right-click the DBeaver application, click "Show Package Contents," and navigate to Contents/Eclipse. On Linux, it's in the /usr/share/dbeaver directory or in the directory where you have installed DBeaver. Open the dbeaver.ini file in a text editor.

Look for the following lines in the file:

-Xms64m
-Xmx1024m

These values specify the initial and maximum memory allocation for the JVM. The -Xms option sets the initial heap size, and the -Xmx option sets the maximum heap size.

Increase the memory allocation by modifying these values. For example, you could change them to:

-Xms128m
-Xmx2048m

This change will set the initial heap size to 128 MB and the maximum heap size to 2048 MB (2 GB).

Save the changes to the dbeaver.ini file and close it.

Restart DBeaver for the changes to take effect.

If you still encounter OutOfMemoryError, try increasing the -Xmx value further. However, keep in mind that allocating too much memory to DBeaver may cause other applications on your system to run out of memory. Make sure to allocate a reasonable amount based on your system's available memory.

-1

At mysql client program, you can config the maxallowedpacket as below. enter image description here

At the mysql server, max_allowed_package is in mysqld.conf (mysql 5.7 version)

enter image description here

If database size is bigger 7GB, you have to make a trick with 256MB as the post https://stackoverflow.com/a/35599592

Duc Toan Pham
  • 474
  • 6
  • 6
-2

I solved it by adding these lines

wait_timeout = 28800 interactive_timeout = 28800 max_allowed_packet=100M

under [mysql] section

Amira Elsayed Ismail
  • 9,216
  • 30
  • 92
  • 175