Title: Database Dump file &#8211; Wrong encoding/charset
Last modified: August 30, 2016

---

# Database Dump file – Wrong encoding/charset

 *  Resolved [qin1](https://wordpress.org/support/users/qin1/)
 * (@qin1)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/database-dump-file-wrong-encodingcharset/)
 * 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/](https://wordpress.org/plugins/backwpup/)

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

 *  Thread Starter [qin1](https://wordpress.org/support/users/qin1/)
 * (@qin1)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/database-dump-file-wrong-encodingcharset/#post-6236256)
 * up
 *  Thread Starter [qin1](https://wordpress.org/support/users/qin1/)
 * (@qin1)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/database-dump-file-wrong-encodingcharset/#post-6236259)
 * up
 *  Plugin Contributor [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * (@danielhuesken)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/database-dump-file-wrong-encodingcharset/#post-6236293)
 * Did you have an Example file for me?
 *  [sbailey4](https://wordpress.org/support/users/sbailey4/)
 * (@sbailey4)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/database-dump-file-wrong-encodingcharset/#post-6236310)
 * 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 */;
 *  [sbailey4](https://wordpress.org/support/users/sbailey4/)
 * (@sbailey4)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/database-dump-file-wrong-encodingcharset/#post-6236311)
 * 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.
 *  [sbailey4](https://wordpress.org/support/users/sbailey4/)
 * (@sbailey4)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/database-dump-file-wrong-encodingcharset/#post-6236312)
 * 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.

 * ![](https://ps.w.org/backwpup/assets/icon-256x256.png?rev=3236141)
 * [BackWPup – WordPress Backup & Restore Plugin](https://wordpress.org/plugins/backwpup/)
 * [Support Threads](https://wordpress.org/support/plugin/backwpup/)
 * [Active Topics](https://wordpress.org/support/plugin/backwpup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/backwpup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/backwpup/reviews/)

## Tags

 * [ANSI](https://wordpress.org/support/topic-tag/ansi/)
 * [charset](https://wordpress.org/support/topic-tag/charset/)
 * [corrupt](https://wordpress.org/support/topic-tag/corrupt/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [dump](https://wordpress.org/support/topic-tag/dump/)
 * [encoding](https://wordpress.org/support/topic-tag/encoding/)
 * [latin](https://wordpress.org/support/topic-tag/latin/)
 * [utf-8](https://wordpress.org/support/topic-tag/utf-8/)

 * 6 replies
 * 3 participants
 * Last reply from: [sbailey4](https://wordpress.org/support/users/sbailey4/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/database-dump-file-wrong-encodingcharset/#post-6236312)
 * Status: resolved