Connection conn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf-8","root","");
mysql 设置为 utf8 字段 设置为 utf8 就可以了
MySQL UTF8配置
本文介绍如何在MySQL中正确设置UTF8编码,确保数据库能够正确存储和检索包含中文字符的数据。
Connection conn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf-8","root","");
mysql 设置为 utf8 字段 设置为 utf8 就可以了
248

被折叠的 条评论
为什么被折叠?