MySQL建表时使用utf8出现警告的解决方法

admin16322021-08-27

MySQL执行建表语句会出现警告 Warning: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to beunambiguous.

中文翻译过来就是:

'utf8'当前是字符集UTF8MB3的别名,但在将来的发行版中将成为UTF8MB4的别名。 为了明确起见,请考虑使用UTF8MB4。 

解决方法:

将 CHARSET=UTF8; 全部改为 CHARSET=UTF8MB4;


网友评论