Views:

Problem:
Attempting to restore a database backup in MySQL, you may run across a restore failure referencing certain tables. These tables may change but at the very bottom of the error you will see "MySQL has gone away".

Solution:
This error occur when attempting to restore a table with larger queries. These can be resolved by tuning the my.ini file accordingly.

  1. Stop any running services, including the internal database.
  2. Backup the install path for the internal database. By default, this located at C:\ProgramFiles(x86)\DocuWare\InternalDatabase\. (This location may be different if changed during install)
  3. Open the my.ini file located in the root of the above path in a text editor.
  4.  Search for "max_allowed_packet". By default, this value is set to 4M. Change this to 40M. (If this value does not work, you may increase further).
  5.  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 install)
  6. Delete the following files:
    a. <servername>.pid
    b. ib_logfile0
    c. ib_logfile1
    d. InternalDatabase.err
  7. Start internal database. This may take slightly longer than normal as it is recreating the log files.
  8. Once started, attempt the restore of the database again. As previously mentioned, if this still fails, please increase the value from Step 4.