mysql 浏览器submit中文, shell乱码
w控制变量法。
初始
浏览器submit中文
成功执行
问题仍未解决
执行
SET character_set_database='latin1';
再执行
SET character_set_results='utf8';
问题解决,shell不再乱码
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_character_set_database
System Variable | Name | character_set_database |
|
Variable Scope | Global, Session | ||
Dynamic Variable | Yes | ||
Footnote | This option is dynamic, but only the server should set this information. You should not set the value of this variable manually. | ||
Permitted Values | Type | string |
The character set used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as character_set_server
.
The global character_set_database
and collation_database
system variables are deprecated as of MySQL 5.7.6 and will be removed in a future version of MySQL.
Assigning a value to the session character_set_database
and collation_database
system variables is deprecated as of MySQL 5.7.6 and assignments produce a warning. The session variables will become read only in a future version of MySQL and assignments will produce an error. It will remain possible to access the session variables to determine the database character set and collation for the default database.
System Variable | Name | character_set_results |
|
Variable Scope | Global, Session | ||
Dynamic Variable | Yes | ||
Permitted Values | Type | string |
The character set used for returning query results such as result sets or error messages to the client.
mysql 浏览器submit中文, shell乱码的更多相关文章
- html声明charset="utf-8"后,浏览器访问中文依旧乱码(绝对有效)
1.情景展示 html文件已经声明字符集为UTF-8,但是浏览器访问依旧乱码. 标题和页面内容都是乱码,这是怎么回事? 2.原因分析 charset="UTF-8"是让浏 ...
- 笔记:PHP查询mysql数据后中文字符乱码
新建表Clubs CREATE TABLE `Clubs` ( `id` ) NOT NULL AUTO_INCREMENT, `name` ) CHARACTER SET utf8 NOT NULL ...
- springmvc+mybatis+mysql 数据库插入中文是乱码
java web项目,前台页面的表单数据,插入到数据库时,结果出现乱码"???"的问题,断断续续折腾了一天时间,废话不说,步骤如下: 一:在web.xml中配置:编码格式拦截器 & ...
- java使用c3p0连接mysql,写中文数据乱码的问题
此文说的乱码,是指所有中文的字符都变成了?. 首先,网上普遍搜索到的解决方案都是告诉你要在数据库连接字符串里面增加编码的定义,完整的连接字符串如下: url="jdbc:mysql://12 ...
- servlet中中文正常显示,mysql数据库手动插入中文正常显示,servlet向mysql中插入中文显示乱码
作者:http://5563447.blog.51cto.com/5553447/1422627 问题是:就是POST请求提交表单数据给servlet,通过JDBC插入Mysql,出现中文乱码. 解决 ...
- java向mysql中写入中文出现乱码
乱码的原因有很多,我遇到的原因是url配置的问题,解决方案: 将: jdbc.url=jdbc:mysql://localhost:3306/XXXX?useUnicode=true&char ...
- android开发中 解决服务器端解析MySql数据时中文显示乱码的情况
首先,还是确认自己MySql账户和密码 1.示例 账户:root 密码:123456 有三个字段 分别是_id .username(插入有中文数据).password 1)首先我们知道 ...
- hibernate操作mysql插入修改中文出现乱码
第一步:mysql的安装目录下配置文件my.ini里面的所有default-character-set改成default-character-set = utf8: 第二部:建立数据库时候字符集选项选
- 关于建立MySQL数据库,中文出现乱码问题
MySQL的ini文件中的默认编码设置utf-8不用改 loose-default-character-set = utf-8 注意:需要改动部分 1.如图所示 建立schema时改变字符编码 改变为 ...
随机推荐
- Bootstrap学习笔记(2)--栅格系统深入学习
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- IIS网站本机可以访问,局域网其他机器无法访问
[开始]打开[控制面板],选择[WINDOWS 防火墙],进入 步骤阅读 2 在防火墙界面,选择左侧边栏的[高级设置] 步骤阅读 3 在弹出的高级安全Windows防火墙界面中,选择左侧边栏的[入站规 ...
- Matlab三维绘图
三维绘图 1 三维绘图指令 类 别 指 令 说 明 网状图 mesh, ezmesh 绘制立体网状图 meshc, ezmeshc 绘制带有等高线的网状图 meshz 绘制带有“围裙”的网状图 曲面图 ...
- 一款纯css3实现的发光屏幕旋转特效
今天给大家带来一款纯css3实现的发光屏幕旋转特效.该屏幕由纯css3实现带发光旋转特效,效果图如下: 在线预览 源码下载 实现的代码. html代码: <div class="s ...
- C语言 · 冒泡法排序
算法提高 冒泡法排序 时间限制:1.0s 内存限制:512.0MB 输入10个数,用“冒泡法”对10个数排序(由小到大)这10个数字在100以内. 样例输入 1 3 6 8 2 7 ...
- yum whatprovides host 根据命令查找包
[root@Cobbler ~]# yum whatprovides host Loaded plugins: fastestmirror Loading mirror speeds from cac ...
- 10款CSS3按钮 - 再也不用为按钮设计而发愁了
这次主要给大家分享10款风格各异的CSS3按钮,如果你希望你的页面也能有很炫的样式,那么我相信这10款CSS3按钮就非常适合你,而且每一款都整理了源代码供参考,一起来看看吧. 1.绚丽的CSS3发光按 ...
- 【BZOJ】3398: [Usaco2009 Feb]Bullcow 牡牛和牝牛(排列组合+乘法逆元+欧拉定理/费马小定理)
http://www.lydsy.com/JudgeOnline/problem.php?id=3398 以下牡牛为a,牝牛为b. 学完排列计数后试着来写这题,“至少”一词可以给我们提示,我们可以枚举 ...
- html的a标签的 href 和 onclick。
主要用于给超链接添加点击事件. aa.html <html> <body> <span>this si</span> </body> < ...
- 一起talk C栗子吧(第十回:C语言实例--最小公倍数)
各位看官们,大家好.从今天開始,我们讲大型章回体科技小说 :C栗子.也就是C语言实例. 闲话休提, 言归正转.让我们一起talk C栗子吧! 看官们,上一回中咱们说的是最大公约数的样例,这一回咱们说的 ...