Forums

[resolved] SQL query error when importing database backup (3 posts)

  1. Christiaan
    Member
    Posted 4 years ago #

    I've dropped all my tables and was trying to re-import my database backup but I get the following error:

    Error
    SQL query:

    #
    # Data contents of table wp_email_list
    #
    INSERT INTO wp_email_list
    VALUES ( 1, 'myemail@mac.com', 1, 2005 -04 -3008 :10 :12, '2005-04-30 08:10:12' ) ;

    MySQL said:

    #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 '08:10:12, '2005-04-30 08:10:12')' at line 1

  2. Christiaan
    Member
    Posted 4 years ago #

    Turns out the WordPress Database Backup plugin definitely did not use correct syntax when backing up. Had to manually add some single quotes.

    Pays to stick with phpMyAdmin it seems.

  3. crenwelge
    Member
    Posted 3 years ago #

    Hi Christiann,

    I'm getting the same problem when trying to import my backup into an empty database:

    SQL query:
    #
    # Data contents of table wp_categories
    #
    INSERT INTO wp_categories
    VALUES ( 1, 'Uncategorized', 'uncategorized', ', 0, 0, 0, 0, 0) ;
    INSERT INTO wp_categories VALUES (2, 'Unusual ', 'unusual ', ', 0, 2, 0, 0, 0 ) ;
    MySQL said:
    #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 'Unusual', 'unusual', ', 0, 2, 0, 0, 0)' at line 1

    I’m using Version 1.7 of database backup, phpMyAdmin 2.9.0 and WordPress 2.1.3. What software did you use to add the single quotes to your database backup and where are they placed?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags