From few days I have a problem when I try to upload WordPress DB in “Run SQL from file” option:
Output from uploaded SQL commands …
ERROR 2013 (HY000) at line 4043 in file: ‘/tmp/.webmin/114015_75977_1_exec_file.cgi’: Lost connection to MySQL server during query
After operation ends, data in tables look OK but when I try to edit some page in Elementor, then I can’t save changes becouse of 500 server error.
This site is being migrated from MySQL 5.7.36 (Ubuntu 18.04). I have migrated many other similar sites to Virtualmin with no problem in the past. My impression is that this problem started to occur after the last MySQL update from version 5.7.35 → 5.7.36 on the old server and from 8.0.26 → 8.0.27 on the new one.
The system definitely seems to have plenty of system resources. Perhaps they are not properly delegated to the task, that is uploading the file via Webmin (which I assume you are doing) may be the culprit or MySQL based on the error message may not be setup to make use of enough resources causing the session to timeout before completion.
I suspect in terms of the 500 error that the import of data is NOT completing so when you try to use Elementor it is failing.
Have you tried uploading the SQL file to the server directly, then running the import via the command line?
Before the problem started, I migrated 20 WP pages from the same old server without any problems and 60 more to a second VPS with the same configuration. DB sizes are not very big, usually 8MB - 100MB.
Interestingly, the broken connection error does not occur with all DBs, only those that have the Elementor plug installed.
The problem appeared after updating MySQL 5.7.36 from 5.7.35 in cooperation with phpMyadmin 5.0.4 - in this case, exporting the database from phpMyadmin causes some crashes in its structure.
Downloading the database with mysqldump in the console allows to get a complete file that can be imported into Virtualmin without error.
I would like to thank everyone for quick answers and provided help!