2

I exported a WordPress database from Sequel Pro and when trying to import it, I get this error:

Unknown collation: 'utf8mb4_unicode_520_ci'

I checked this similar question and did these steps:

  • First when I imported I made sure compatibility is changed from NONE to MYSQL40. (didnt work)
  • Then I opened the sql dump in text editor and replaced all "utf8mb4" to "utf8" (didnt work)
  • I changed collection in phpMyAdmin to 'utf8_general_mysql500_ci' (didnt work).
  • I changed collection in phpMyAdmin to 'utf_unicode_ci' (didnt work).
  • I opened the sql dump in text editor and replaced all ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; to ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; but didnt work

How can I successfully import this sql database ?

Community
  • 1
  • 1
user7592255
  • 91
  • 2
  • 7
  • Before considering your workaround options, do you have the option of addressing it directly? You're seeing this issue because you're attempting to import a DB into an older version of MySQL (<5.5.3). The first thing I'd be looking at is whether I can bring MySQL up to date (taking all the necessary precautions in doing so of course). Failing that, you said you changed the compatibility on import. Did you change the compatibility when exporting? – Nathan Dawson Apr 06 '17 at 03:18
  • I can't update MySQL because it is shared hosting. Sequel Pro export doesnt have compatibility. The export is [like this](http://www.backuphowto.info/files/articles/2012/02/sequel-pro-mysql-backup.png) – user7592255 Apr 06 '17 at 05:01
  • What version of Wordpress? See https://make.wordpress.org/core/2015/04/02/the-utf8mb4-upgrade/ – Rick James Nov 20 '18 at 18:41

1 Answers1

3

The same thing occurred to me, when i was importing local wordpress database to server.

Open the sql dump in text editor and set

CHARSET to utf8mb4

and

COLLATE to utf8mb4_unicode_ci

Ritz Cool
  • 396
  • 1
  • 6