Problem:
When attempting to restore a database backup in MySQL, we encounter a restore failure referencing certain tables. The tables may change. However, the following error is always displayed
"MySQL has gone away."
Solution:
This error may occur when attempting to restore a table with large queries. To resolve this issue, please refer to the following guide;
- Stop any running services, including the internal database.
- Backup the install path for the internal database. By default, this is located at C:\ProgramFiles(x86)\DocuWare\InternalDatabase (This location may be different if changed during installation).
- Open the my.ini file located at the root of the above path.
- In the file, search for "max_allowed_packet." By default, this value is set to 4M. Change it to 40M. (If this value does not work, you may increase it further.)
- Open the Internal Database data folder. By default, this is located C:\ProgramFiles(x86)\DocuWare\InternalDatabase\Data. (This location may be different if changed during installation)
- Delete the following files:
a. <servername>.pid
b. ib_logfile0
c. ib_logfile1
d. InternalDatabase.err - Start internal database. This may take slightly longer than normal as it is recreating the log files.
- Once started, attempt the restore of the database again. As previously mentioned, if this still fails, please increase the value from Step 4.
KBA is applicable to On-premise Organizations ONLY