Legacy Knowledge Base
Published Sep. 10, 2025

Is using MySQL 5.6 with collation CHARACTER SET utf8mb3 recommended?

Written By

Sebastian Madaras

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Using Liferay 7.0 with MySQL 5.6 with collation CHARACTER SET utf8mb3 has certain limitations. 

Environment

  • Liferay 7.0

Resolution

  • By default, Liferay creates database tables in MySQL 5.6 with utf8mb3 (limited to only characters that have at most 3 bytes in your UTF-8 representation), and the character shared requires a 4-byte representation in UTF-8. As a result, each individual table in your MySQL 5.6 databasemustbe in utf8mb4 if you wish to allow for your content creators to create content using characters that have a 4-byte UTF-8 representation.

  • The reason it is not reproduceable  in MySQL 5.7 is that Liferay does not know how to properlycreatetables with utf8mb4 on MySQL 5.6, as noted inLPS-70734. Even if the default character set on the database is utf8mb4, MySQL 5.6 doesn't honor that for table creation (you have to explicitly set it, and Liferay does not do so in its creation statements, instead assuming that the database will take care of it).

  • In addition to table creation issues, in order to avoid index creation errors, you also have to make sure that MySQL is not using Antelope (the default InnoDB file format in MySQL 5.6) and instead use Barracuda (the default InnoDB file format in MySQL 5.7 and also an option for MySQL 5.6). This is also noted inLPS-70734.

  • Our recommendation is to use character set UTF-8.

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base