您当前的位置: 首页 >  sql

程序员一灯

暂无认证

  • 4浏览

    0关注

    152博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

mysql乱码问题

程序员一灯 发布时间:2019-05-17 19:05:19 ,浏览量:4

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;

 

关注
打赏
1645367472
查看更多评论
立即登录/注册

微信扫码登录

0.1661s