[wp-trac] [WordPress Trac] #39411: Import Error: sql database utf8mb4 versus utf8

WordPress Trac noreply at wordpress.org
Wed Dec 28 06:28:43 UTC 2016


#39411: Import Error: sql database utf8mb4 versus utf8
--------------------------+----------------------
 Reporter:  vtorres7332   |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Import        |     Version:  4.7
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Old description:

> I am having an issue importing a wordpress database from my hosting
> service to Go Daddy and it seems to be because of the formatting of the
> new word press my SQL using utf8mb4 versus utf8.
>
> This is the error that I am getting when I try to import it to Godaddy:
>
> SQL query:
>
> --
> -- Database: `swsproje_prjctdb11`
> --
> -- --------------------------------------------------------
> --
> -- Table structure for table `wp_commentmeta`
> --
> CREATE TABLE IF NOT EXISTS  `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_520_ci DEFAULT NULL ,
>  `meta_value` LONGTEXT COLLATE utf8mb4_unicode_520_ci,
> PRIMARY KEY (  `meta_id` ) ,
> KEY  `comment_id` (  `comment_id` ) ,
> KEY  `meta_key` (  `meta_key` ( 191 ) )
> ) ENGINE = MYISAM DEFAULT CHARSET = utf8mb4 COLLATE =
> utf8mb4_unicode_520_ci AUTO_INCREMENT =1;
>
> MySQL said: Documentation
>
> #1273 - Unknown collation: 'utf8mb4_unicode_520_ci'
>

> Could you please tell me how to correct this problem, I really need to
> move over this website.
>
> Thank you in advance for your help.
>
> Victor Torres

New description:

 I am having an issue importing a wordpress database from my hosting
 service to Go Daddy and it seems to be because of the formatting of the
 new word press my SQL using utf8mb4 versus utf8.

 This is the error that I am getting when I try to import it to Godaddy:

 SQL query:
 {{{
 --
 -- Database: `swsproje_prjctdb11`
 --
 -- --------------------------------------------------------
 --
 -- Table structure for table `wp_commentmeta`
 --
 CREATE TABLE IF NOT EXISTS  `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_520_ci DEFAULT NULL ,
  `meta_value` LONGTEXT COLLATE utf8mb4_unicode_520_ci,
 PRIMARY KEY (  `meta_id` ) ,
 KEY  `comment_id` (  `comment_id` ) ,
 KEY  `meta_key` (  `meta_key` ( 191 ) )
 ) ENGINE = MYISAM DEFAULT CHARSET = utf8mb4 COLLATE =
 utf8mb4_unicode_520_ci AUTO_INCREMENT =1;

 MySQL said: Documentation

 #1273 - Unknown collation: 'utf8mb4_unicode_520_ci'
 }}}

 Could you please tell me how to correct this problem, I really need to
 move over this website.

 Thank you in advance for your help.

 Victor Torres

--

Comment:

 Hi @vtorres7332 and welcome to Trac,

 Trac is for reporting issues with WordPress, and is not available for
 support requests, for that we have the [https://wordpress.org/support/
 Support Forums].

 In this case though, I'll note that the ''correct'' (and only supported)
 method of transferring WordPress sites is to perform an Export/Import, and
 not simply transfer databases. You may be able to use other tools that
 perform a WordPress site transfer too.
 In the event that you want to use a database transfer though, you'll need
 to ensure that the MySQL version you're transferring to supports the same
 database collations as what your current version does - and in this case
 it does not.
 In order to perform a SQL export/import you'd need to first convert the
 database from the `utf8mb4_unicode_520_ci` format to either
 `utf8mb4_unicode_ci` or `utf8_general_ci` - which depending on the content
 of your database may not be possible without data loss. How to do that is
 beyond what support I can offer you here, someone in the forums may be
 able to assist, or your host may be able to help you import the content.

 I'm marking this ticket as invalid, as it's not a bug within WordPress,
 replies can be left without re-opening.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39411#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list