When creating a copy of a database in Plesk at Domains > example.com > Databases, the process hangs without any result. The following error message appears in the Plesk logfile
ERR [panel] Unable to dump source database: mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table
A Plesk backup task finishes with the following error message:
PLESK_INFO: Not all the data was backed up into /path/to/databases/example_db successfully. Total space: 100.00 GB; Available space: 60.00 GB; Mounted on: /datavolume. mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table
The current limits in MySQL configuration are not enough for dumping the database.
Increase the limits:
Connect to the Plesk server via SSH.
Open the MySQL configuration file
my.cnfin a text editor. In this example, we are using the vi editor:
on CentOS/RHEL-based distributions:
# vi /etc/my.cnf
on Debian/Ubuntu-based distributions:
# vi /etc/mysql/my.cnf
Add the following lines under the
Save the changes and close the file.
Restart MySQL server using one of the commands below. The command depends on operating system and installed MySQL version:
# service mysql restart
# service mariadb restart