• Resolved George

    (@chainkiller)


    I tried to clone my site on localhost but when i restored the database, through phpmyadmin, i got the following error:

    SQL query:
    
    INSERT INTO 'hddl_terms' VALUES (2,'default-boxes','default-boxes',0),(6,'A','a-1245',0),(7,'B','b-1245',0),(8,'C','c-1245',0),(9,'D','d-1245',0),(11,'E','e-1245',0),(13,'F','f-1245',0),(15,'M','m-1245',0),(16,'R','r-1245',0),(18,'S','s-1245',0),(19,'T','t-1245',0),(20,'U','u-1245',0),(22,'Z','z-1245',0),([...]
    
    #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 'ALTER TABLE <code>hddl_terms</code> ENABLE KEYS */;
    UNLOCK TABLES;
    
    --
    -- Table structure f' at line 2

    Server:
    – php 5.6.4
    – mysql 5.0.11

    Localhost:
    – php 5.6.4
    – mysql 5.0.11

    https://wordpress.org/plugins/backupwordpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter George

    (@chainkiller)

    I found the cause of this.
    I have a taxonomy term ending with a single quote ‘ .
    The plugin generated sql file puts a backslash \ before it, but when exported through phpmyadmin it has another single quote before.

    Exported by BackUpWordPress:
    (421, 'term name\'', 'term-name', 0),

    Exported by phpmyadmin:
    (421, 'term name''', 'term-name', 0),

    Plugin Contributor Paul de Wouters

    (@pauldewouters)

    George

    Thanks for the update and great debugging! This might need a fix on our side although it would be rare to voluntarily have an apostrophe at the end of a taxonomy term

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

The topic ‘Backuped sql gives error on restore’ is closed to new replies.