SHOW VARIABLES LIKE 'character_set_%';
SET character_set_client = utf8;
SET character_set_results = utf8;
SET character_set_connection = utf8;
1.检查数据库字符集
键入 SHOW VARIABLES LIKE 'character_set_%';
2.根据表的字符集编码调整相关配置,本文以utf8为例
SET character_set_client = utf8;
SET character_set_results = utf8;
SET character_set_connection = utf8;
再次查询即可发现,控制台已正常显示
网友评论