• Resolved qin1

    (@qin1)


    For some reason, the mysql dump files are in ANSI encoding when the database itself uses UTF-8. So some of the characters will be corrupted, so the dump files are are unusable.

    In wp-config.php I have these lines:

    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ‘utf8_swedish_ci’);

    I am using currently latest version 3.1.4

    https://wordpress.org/plugins/backwpup/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter qin1

    (@qin1)

    up

    Thread Starter qin1

    (@qin1)

    up

    Plugin Author Daniel Hüsken

    (@danielhuesken)

    Did you have an Example file for me?

    Getting the same issue except I am getting the backup just cant restore it. All the backups have the following code in there now. Example below

    DROP TABLE IF EXISTS wp_commentmeta;
    /*!40101 SET @saved_cs_client = @@character_set_client */;
    /*!40101 SET character_set_client = ‘utf8’ */;
    CREATE TABLE wp_commentmeta (
    meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    comment_id bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    meta_key varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    meta_value longtext COLLATE utf8mb4_unicode_ci,
    PRIMARY KEY (meta_id),
    KEY comment_id (comment_id),
    KEY meta_key (meta_key(191))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    /*!40101 SET character_set_client = @saved_cs_client */;

    More research and I found that the last good backup I got was on 7/22 that did not have that utf8b4_unicode_ci entry. That one would restore using godaddy phpAdmin. WordPress auto-updated to 4.2.3 the next day 7/23 and all backups since then have this code and will not restore generating an error – #1273 – Unknown collation: ‘utf8mb4_unicode_ci’. So its looking like WP 4.2.3 may have caused this issue. Of course godaddy support said this plugin was causing it. 🙂 Even though a backup using the hosting tools does the same thing.

    OK more info. Found that WP is not supposed to update the database UTF8 version unless your MySQL supports it. Godaddy classic hosting is using MySQL 5.0.96 so does not support the utf8mb4 Unicode. Long story short, on Friday 7/23 not only did WP update to version 4.2.3 but Godaddy had an issue with the database server where it was offline for a bit. They had other calls while I was on with them. Then suddenly it was back online. Of course level one support had no idea why or what happened. We just were happy it was back online. Backups after that is when I was getting the utf8mb4 versions. I also have a staging site and its attached to another database on another godaddy server (it was working when the site went down) Those SQL files were still utf8. Not sure why but whatever they did to get it back online must have converted the database to use utf8mb4 Anyway after restoring the production site from a backup prior to 7/23 all seems well. Running a backup using godaddy hosting or this plugin gets a utf8 version that will restore now. Probably going to move to godaddy cPanel hosting as it uses MySQL 5.5.35 and apparently other features that are better than their depreciated Classic hosting.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Database Dump file – Wrong encoding/charset’ is closed to new replies.