Support » Plugin: BackUpWordPress » [Plugin: BackUpWordPress] Error on database restore

  • I tried to import the data backup into an existing WP database and received the error below. I also received the same error when I imported into a new database.

    The rest of the database seems to import OK. Any suggestions?

    MySQL Version 5.1.63-cll
    PHP version 5.2.17
    WordPress 3.4.1.

    SQL query:
    # Data contents of table wp_eom_dates (1 records)
    INSERT INTO wp_eom_dates
    VALUES ( 1, 1, 2012 -07 -1505 :52 :18, ‘2014-08-09 14:00:00’, ‘2014-08-16 16:00:00’ ) ;

    MySQL said: Documentation
    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’05:52:18, ‘2014-08-09 14:00:00’, ‘2014-08-16 16:00:00′)’ at line 5

Viewing 6 replies - 1 through 6 (of 6 total)
  • The full SQL statement in the SQL backup file is

    #INSERT INTO wp_eom_dates VALUES (1, 1, 2012-07-15 05:52:18, ‘2014-08-09 14:00:00’, ‘2014-08-16 16:00:00’)

    There is a space between the date and time (2012-07-15 05:52:18) and yet somehow these are being interpreted as being one string in the import, hence (2012 -07 -1505 :52 :18) with no space between 15 and 05.

    What delimiter should be there or is there a workaround by removing the time and leaving the date alone?

    Or is there another error?

    The problem is some of the dates don’t have single quotes around them.
    Now fixed and website back up.

    Is this an error caused by the backup process or by errors in the database?

    Plugin Author Tom Willmot


    Hmm, I’m not sure to be honest.

    Those are custom tables that I assume came from a plugin.

    Could you look at the plugin and see if it’s create table syntax is correct?

    You could also try manually doing a database dump from the server and see if that has the same issues.

    I am having exactly the same problem, and it is because the MySQL database dump created by BackUpWordPress does not enclose DATETIME values in delimiters. Every other site backup or site export method I’ve tried lately (cPanel, the Duplicator plugin for WordPress, the DesktopServer Premium development environment) quotes DATETIME values.

    Tom, can you please update BackUpWordPress to do the same? Based on what other backup software does, this seems to be standard practice.

    Thank you,

    Fred Chapman


    I mistakenly assumed that datetime and timestamp values were treated the same way by this plugin, but that’s not the case. I just double-checked a database backup which I created with this plugin, and datetime values are enclosed in quotes. It’s timestamp values which are not enclosed in quotes, and that’s what causes the syntax error when I try to import a database backup in phpMyAdmin.


    I developed a workaround for the unquoted timestamp problem and posted it here:

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: BackUpWordPress] Error on database restore’ is closed to new replies.