@
baocaixiong 我把你的代码复制过去也不行呢。
mysql> CREATE TABLE `test` (
-> `id` bigint(20) unsigned NOT NULL auto_increment,
-> content varchar(300) default '',
-> PRIMARY KEY (`id`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 collate=utf8mb4_general_ci;
Query OK, 0 rows affected (0.01 sec)
mysql> insert into test (content)values( "🎉");
ERROR 1366 (HY000): Incorrect string value: '\xF0\x9F\x8E\x89' for column 'content' at row 1
我的 MySQL 版本是:
Server version: 5.7.24 MySQL Community Server (GPL)