Restoring Backup error
2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 14, 2022 (RSS)
By paulmac - February 14, 2022
Hi
I am moving a site to a new server. When I try to do a restore from a backup on the new server I get the following error message
MySQL Error: BLOB, TEXT, GEOMETRY or JSON column 'template_id' can't have a default value
Can you advise
Thanks
By daniel - February 14, 2022
Hi paulmac,
Errors like this often occur when a backup is made using a version of MySQL that differs significantly from the version where it is trying to be restored. If you're able to adjust the MySQL version on the new server to match the old one (or, update the version on the old server and make a new backup) that should resolve the issue.
An alternate solution would be to manually correct the backup file. Opening up the backup file in a text editor with a find/replace function and removing all instances of the string " DEFAULT NULL" will usually do the trick.
Let me know if either of those solutions works for you!
Thanks,
Technical Lead
interactivetools.com