网络营销电子商务研究中心  
USA Web Hosting Direct
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > MySQL
User Name
Password
 
FAQ Members List Calendar 域名注册 PHP Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1   IP: 104.223.97.4
Old 2018-01-28, 10:41 PM
Parral Parral is offline
初级会员
 
Join Date: 2011-01-27
Posts: 1
Parral 现在声名狼藉
Default Importing a WordPress database: How to fix the Unknown collation: ‘utf8mb4_unicode_ci

Importing a WordPress database: How to fix the Unknown collation: ‘utf8mb4_unicode_ci’ error


If you do a lot of exporting and importing to different database servers, you’ll be familiar with the frustration of encountering MySQL import errors. Every so often when importing a WordPress dump file into a client’s database, I will encounter an Unknown collation error like the following:

Unknown collation: 'utf8mb4_unicode_ci'

Sometimes it will come up as:

Unknown collation: 'utf8mb4_unicode_520_ci'

This is caused by a difference in encoding types between the source and destination databases. It usually happens when you export from a newer MySQL database (MySQL 5.5.3 and above) which uses utf8mb4, then attempt to import into an older version using utf8. If you are importing from a dump file generated from a MySQL 5.6 database, you may get the utf8mb4_unicode_520_ci message. The 520 refers to MySQL’s use of Unicode Collation Algorithm 5.2.0. Unknown collation errors may also happen if you are trying to import a MariaDB database into MySQL. I tend to get unknown collation errors with my Rackspace Cloud accounts after Rackspace started offering MariaDB as a database option.

Ideally one would upgrade the older destination database but this isn’t always a realistic option. There are a number of discussion threads on the WordPress forum about what to do. Fortunately, many web hosting accounts have a phpMyAdmin interface which provides an easy work-around for the problem.

Format-specific options during a phpMyAdmin database export
Log in to your database server using phpMyAdmin
Make sure you select your database and go to the “Export” tab
Select the “Custom” radio button
Go the section “Format-specific options” and in the setting for “Database system or older MySQL server to maximize output compatibility with:” select MYSQL40.
Scroll to the bottom and click GO.

Attached Images
File Type: jpg phpmyadmin-format-specific-options.jpg (18.5 KB, 1 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
坚决不让代理黄了 9 topvip 网络资源 0 2008-10-18 11:39 AM
坚决不让代理黄了 8 topvip 网络资源 0 2008-10-18 11:38 AM
坚决不让代理黄了 7 topvip 网络资源 0 2008-10-18 11:37 AM
坚决不让代理黄了 2 topvip 网络资源 0 2008-10-18 11:35 AM
分享代理 car 网络资源 0 2008-08-25 06:57 PM

Prescription-glasses.com offers prescription glasses online at discount prices.
所有时间均为 +8. 现在的时间是 09:42 PM, Free Patent & Patent Ideas