daniloaz / myphp-backup

Simple and fast MySQL backups using PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MySQL server has gone away

cavo789 opened this issue · comments

Very nice work! Congrats!

No problem with the backup script but well with the restore one. Here is the error message:

Warning: mysqli_query(): MySQL server has gone away in myphp-restore.php on line 157

The .sql file is big (more than 25MB); I think it's somethink like a timeout but the script runs fast in fact. I quickly receive this error then the script stop.

Thanks

Hi! Thank you for your feedback. I think your error message is not due to file size, as the restoration script processes the SQL file line by line and performs multiple queries. Please, try these tips and if you continue to have these error messages let's reopen the issue: https://matomo.org/faq/troubleshooting/faq_183/

Thanks!

Change the insert statements in the backup file to 1 per row. I had same problem. Is the fault of the batchsize too large. The script should be updated to have option of 1 insert statement per row.