Title: Syntax error on database restore
Last modified: May 21, 2026

---

# Syntax error on database restore

 *  [mllapan](https://wordpress.org/support/users/mllapan/)
 * (@mllapan)
 * [2 days, 15 hours ago](https://wordpress.org/support/topic/syntax-error-on-database-restore/)
 * Hi.
   I have a syntax error with many wf tables importing database as follow.
 * `#1064 - You have an error in your SQL syntax; check the manual that corresponds
   to your MariaDB server version for the right syntax to use near 'AS 00000000000000000000000000000000,
   blockedTime bigint(20) NOT NULL,`

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 days, 12 hours ago](https://wordpress.org/support/topic/syntax-error-on-database-restore/#post-18914354)
 * Hi [@mllapan](https://wordpress.org/support/users/mllapan/), thanks for reaching
   out.
 * Are you using a backup/migration tool or plugin to import the WordPress database?
   If so, I would check in with their support to see if the SQL on import is getting
   malformed or isn’t compatible with your version of MariaDB.
 * Our `lib/wfSchema.php` file including the code for the `wfBlocks7` table contains
   syntax that looks _similar_ to the output you’ve shown above but the `IP` column
   line doesn’t use keyword “AS”, which is shown as part of your error message.
 *     ```wp-block-code
       IP binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',blockedTime bigint(20) NOT NULL,
       ```
   
 * Let us know what you find out,
   Peter.
 *  Thread Starter [mllapan](https://wordpress.org/support/users/mllapan/)
 * (@mllapan)
 * [2 days, 12 hours ago](https://wordpress.org/support/topic/syntax-error-on-database-restore/#post-18914373)
 * Hi, wfpeter.
 * I am exporting database via phpmyadmin as a sql.
 * 11.8.6-MariaDB
 * Everything works even without this, but I guess it resets blocked IPs and stuff
   in plugin, and I have noticed it resets the license as well.
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 days, 7 hours ago](https://wordpress.org/support/topic/syntax-error-on-database-restore/#post-18914757)
 * Thanks for clarifying [@mllapan](https://wordpress.org/support/users/mllapan/).
 * If the database is being exported/imported through phpMyAdmin on MariaDB, this
   sounds more like a backup/export compatibility issue than a Wordfence plugin 
   issue.
 * It might still be worth checking-in with your hosting provider if they support
   the phpMyAdmin and MariaDB installations on your server to see whether the export
   is being generated correctly.
 * Thanks again,
   Peter.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsyntax-error-on-database-restore%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * Last activity: [2 days, 7 hours ago](https://wordpress.org/support/topic/syntax-error-on-database-restore/#post-18914757)
 * Status: not resolved