当前位置:网站首页>sql编码bug
sql编码bug
2022-07-27 18:15:00 【Fairy要carry】
场景:
之前在写订单业务中,我远程了用户信息模块和课程信息模块,然后封装到订单类中进行插入,全程debug一遍发现数据都是正常的,没有编码问题,当调用insert插入到数据库中时候发现出现了bug,中文乱码,猜测是server到sql时候可能编码有问题
解决:
show databases;
对有问题的表设置下字符集
alter database xxx character set utf8;查看mysql字符集
show variables where Variable_name like '%char%';查看数据表字符集
show create table t_demo;修改数据库字符集
set character_set_client=utf8;
set character_set_connection=utf8;
set character_set_database=utf8;
set character_set_results=utf8;
set character_set_server=utf8;
set character_set_system=utf8;
set collation_connection=utf8;
set collation_database=utf8;
set collation_server=utf8;修改数据表字符集
alter table t_demo character set utf8;边栏推荐
- 做测试, 就得去大厂,内部披露BAT大厂招聘“潜规则”
- It is said that Intel will stop the nervana chip manufactured by TSMC at 16nm
- 一个程序员的水平能差到什么程度?
- 十年测试老鸟聊聊移动端兼容性测试
- 【数据集显示标注】VOC文件结构+数据集标注可视化+代码实现
- Write bootloader from 0
- MySQL basic queries and operators
- Management of user organization structure
- Software test interview question: given a queue, such as: [1, 3, 5, 7], how to put the first number into the third position to get: [3, 5, 1, 7]
- Onion group joined hands with oceanbase to realize distributed upgrading, and global data has achieved cross cloud integration for the first time
猜你喜欢

说透缓存一致性与内存屏障

Understand the wonderful use of dowanward API, and easily grasp kubernetes environment variables
![[benefit activity] stack a buff for your code! Click](/img/2d/dabf0ad5d7bd553dada5921abf6c06.png)
[benefit activity] stack a buff for your code! Click "tea" to receive the gift

LabVIEW学习笔记五:按钮按下后无法返回原状

一周活动速递|深入浅出第8期;Meetup成都站报名进行中

征服所有程序员的3件IT装备 →

EasyCVR平台关闭录像为何还会有TS切片文件生成?

一个程序员的水平能差到什么程度?
![[Alibaba security × ICDM 2022] 200000 bonus pool! The risk commodity inspection competition on the large-scale e-commerce map is in hot registration](/img/38/9fadea0d37053a3ebb73806a9963f1.jpg)
[Alibaba security × ICDM 2022] 200000 bonus pool! The risk commodity inspection competition on the large-scale e-commerce map is in hot registration

When adding RTSP devices to easycvr platform, what is the reason for the phenomenon that they are all connected by TCP?
随机推荐
Injection attack
IE11 下载doc pdf等文件的方法
Laboratory management system implemented by SSM framework +jsp [source code + database + system paper]
Leetcode:1498. Number of subsequences that meet the conditions [sort + bisection + power hash table]
Onion group joined hands with oceanbase to realize distributed upgrading, and global data has achieved cross cloud integration for the first time
In 2019, the global semiconductor market revenue was $418.3 billion, a year-on-year decrease of 11.9%
Session attack
金仓数据库 KingbaseES 异构数据库移植指南 (4. 应用迁移流程)
Download of MySQL driver jar package -- nanny tutorial
Why does Alibaba prohibit more than three forms from joining?
What app should individuals use for stock speculation to be safer and faster
学术分享 | 清华大学 康重庆:电力系统碳计量技术与应用(Matlab代码实现)
Understand │ what is cross domain? How to solve cross domain problems?
Analysis on the optimization of login request in IM development of instant messaging mobile terminal
用户和权限修改用户密码
When adding RTSP devices to easycvr platform, what is the reason for the phenomenon that they are all connected by TCP?
说透缓存一致性与内存屏障
金仓数据库 Oracle至KingbaseES迁移最佳实践(2. 概述)
JVS基础介绍
Oracle +JDBC