以下是官方说明,大概意思是UTF8存储每个字符最大使用3个字节,而utf8mb4存储每个字符 最大可以使用4个字节。有些UTF8无法存储的utf8mb4就可以。下面的英文可以自己再看一下
The utf8mb4 Character Set (Four-Byte UTF-8 Unicode Encoding)
The character set named utf8 uses a maximum of three bytes per character and contains only BMP characters. As of MySQL 5.5.3, the utf8mb4 character set uses a maximum of four bytes per character supports supplemental characters:
•
For a BMP character, utf8 and utf8mb4 have identical storage characteristics: same code values, same encoding, same length.
•
For a supplementary character, utf8 cannot store the character at all, while utf8mb4 requires four bytes to store it. Since utf8 cannot store the character at all, you do not have any supplementary characters in utf8 columns and you need not worry about converting characters or losing data when upgrading utf8 data from older versions of MySQL.