show variables like 'character%';查看字符编码
--更改字符集 SET character_set_client = utf-8 ; SET character_set_connection = utf8 ; SET character_set_database = utf8 ; SET character_set_results = utf8 ; SET character_set_server = utf8 ;
SET collation_connection = utf8 ; SET collation_database = utf8 ; SET collation_server = utf8 ; 获取连接时候:jdbc:mysql://localhost:3306/数据库名?useUnicode=true&characterEncoding=utf8 查询时候:set names gbk;