utf-8 时变化长度的编码,储存一个code point 需要1~4个字节. 然而,mysql的utf8只存储最多3个字节per code point. 所以,utf8字符集不能存储所有的unicode code points. 只能从0x000 to 0xFFFF(叫做Basic Multilingual Plane:BMP) The character set named utf8 uses a maximum of three bytes per character and contai
由于需要用到utf8mb4,之前是utf8现在给改成utf8mb4 查看当前环境 SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%'; +--------------------------+--------------------+ | Variable_name | Value | +--------------------------+-------
由于需要用到utf8mb4,之前是utf8现在给改成utf8mb4 查看当前环境 SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%'; +--------------------------+--------------------+ | Variable_name | Value | +--------------------------+---------