• Resolved buko.software

    (@bukosoftware)


    I’m trying to import a sql backup of wordpress website with wordfence installed.

    It gives me an error (and blocks import) because of primary column of table wp_wfblockediplog (and other wordfence tables too) containing strange encoding chars:

    ERROR 1062 (23000) at line 1680: Duplicate entry '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xEF\xBF\xBD\xEF\xBF\xBD' for key 'PRIMARY'

    If I check sql file i can find something like:

    INSERT INTO wp_wfblockediplog VALUES (‘\0\0\0\0\0\0\0\0\0\0ÿÿl˜y’,’GB’,2,18964,’brute’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ–Â7′,’US’,1,18964,’brute’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ\”{},’,’US’,1,18968,’waf’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ#ÇC’,’BE’,2,18965,’waf’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ.¡Ž’,’RU’,5,18964,’brute’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ.¡Ž’,’RU’,1,18968,’brute’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ6úg»’,’JP’,1,18968,’waf’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿBs­’,’US’,1,18962,’waf’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿCÍ2′,’US’,1,18962,’waf’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿl£éj’,’US’,4,18965,’waf’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ‹¢ý’,’SG’,1,18963,’brute’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ°¥\” ‘,’FR’,3,18967,’brute’),(‘\0\0\0\0\0\0\0\0\0\0ÿÿ¯ג,’IR’,1,18962,’waf’),(‘*øÀt9\0\0\0\0\0\0\0′,’DE’,4,18965,’waf’),(‘* \’D\0\0\0\0\0\0\0′,’DE’,1,18968,’waf’) [..]`

    Anyone has similar problem?

    THanks

Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @bukosoftware, I appreciate your detailed message, thank-you for reaching out!

    The values appearing encoded like this are most likely down to importing from an encoded file, which many backup plugins/applications may do when exporting, to avoid the entire contents of your database being clearly displayed when the file is viewed.

    A duplicate primary key shouldn’t have been allowed when the records were originally created, so a broken index in the original database is the most probable situation here.

    You may be able to import using the --force option described here:
    https://stackoverflow.com/questions/7622253/how-to-skip-row-when-importing-bad-mysql-dump

    Let me know how it goes!

    Peter.

Viewing 1 replies (of 1 total)

The topic ‘Duplicate primary key on import sql backup’ is closed to new replies.