星空网 > 软件开发 > 数据库

jdbc链接mysql插入数据后显示问号

1.在cmd中进入mysql查看默认的编码格式:
mysql> show variables like "%char%";

若不是utf8(因为我用的是utf8),关掉mysql服务,在my.ini中添加

[client]
default-character-set=utf8

[mysqld]
default-storage-engine=INNODB
character-set-server=utf8
collation-server=utf8_general_ci

[mysql]
default-character-set=utf8

2.eclipse中的编码格式是否为utf8

3.如果还是不可以,检查mysql客户端表格的编码方式

show create table tablename 

如果不是utf-8.删掉重新建立一张表(之前我在原表上改动没有成功,可能是我自己操作的原因)




原标题:jdbc链接mysql插入数据后显示问号

关键词:MYSQL

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

为什么要建设海外仓:https://www.goluckyvip.com/tag/43384.html
为什么要做海外仓:https://www.goluckyvip.com/tag/43385.html
为什么要做跨境电商:https://www.goluckyvip.com/tag/43386.html
为什么用海外仓:https://www.goluckyvip.com/tag/43387.html
为树教育BeTree:https://www.goluckyvip.com/tag/43388.html
违规产品:https://www.goluckyvip.com/tag/43389.html
船底顶攻略(船底顶最详细攻略):https://www.vstour.cn/a/411239.html
川藏线自驾游要怎么走才比较划算呢?:https://www.vstour.cn/a/411240.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流