[wp-trac] [WordPress Trac] #37689: Issues with utf8mb4 collation and the 4.6 update

WordPress Trac noreply at wordpress.org
Fri Aug 26 06:29:57 UTC 2016


#37689: Issues with utf8mb4 collation and the 4.6 update
--------------------------+------------------------------
 Reporter:  Hristo Sg     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:  4.6
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+------------------------------

Comment (by SGr33n):

 Hi people,
 I had this issue on a website, and the commenting of the DB_CHARSET didn't
 work, because some plugin stopped working. So I had a look at the database
 discovering that the issue was on the database (so I assume this depends
 on a wrong convertion). Here is how to correct the database, but please
 test this on a staging environment, don't do that on a production website.

 On the following website you can see that if there are characters like ù
 or á the original charset was latin1, so open a shell console on the
 server and run:


 {{{
 mysqldump -uUSERNAME -p --default-character-set=latin1 DATABASE_NAME >
 dump-latin1.sql
 [enter your password]
 }}}

 Then you have to edit this file in order to make a small correction, but
 if it will big the editing will require RAM or time:


 {{{
 nano dump-latin1.sql
 }}}

 Change

 {{{
 /*!40101 SET NAMES latin1 */;
 }}}

 to


 {{{
 /*!40101 SET NAMES utf8 */;
 }}}

 save by entering CTRL+X
 enter Y

 Now your dump is ready, so I suggest to restore it on another account, in
 order to have a backup of the old one, or to add a prefix to the existent
 tables.

 Restore it with:


 {{{
 mysql -uUSERNAME -p DATABASE_NAME < dump-latin1.sql
 [enter your password]
 }}}

 Your WordPress should now work as expected.

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


More information about the wp-trac mailing list