欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

设置utfmb

程序员文章站 2022-07-15 09:05:39
...

show variables like 'character_set_%';

 

 

show variables like 'collation_%';

 

ALTER DATABASE database CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

 


ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

 

 ALTER TABLE dream_comment CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

 

 

jdbc:mysql://*******:3306/database?#useUnicode=true&noAccessToProcedureBodies=true&autoReconnect=true&rewriteBatchedStatements=TRUE