High Performance MySQL, Third Editionby Baron Schwartz, Peter Zaitsev, and Vadim Tkachenko

Settings for client/server communication When the server and the client communicate with each other, they might send data back and forth in different character sets. The server will translate as needed:

• The server assumes the client is sending statements in the character set specifiedby character_set_client.

• After the server receives a statement from the client, it translates it into the characterset specified by character_set_connection. It also uses this setting to determinehow to convert numbers into strings.

• When the server returns results or error messages back to the client, it translatesthem into character_set_result.

Suppose you open a client connection with latin1 (the default character set, unless you’ve used mysql_options() to change it) and then use SET NAMES utf8 to tell the serverto assume the client is sending data in UTF-8. You’ve created a character set mismatch,which can cause errors and even security problems.

SET NAMES的更多相关文章

  1. Replication-Replication Distribution Subsystem: agent xxxxxx failed. Column names in each table must be unique

    最近遇到一个关于发布订阅(Replication)的奇葩问题,特此记录一下这个案例.我们一SQL SERVER数据库服务器出现大量告警.告警信息如下所示: DESCRIPTION: Replicati ...

  2. couldn't open file: data/coco.names

    在ubuntu下配置yolo(v2)的时候,编译了源码后,尝试运行demo: ./darknet detect cfg/yolo.cfg yolo.weights data/dog.jpg 结果报错提 ...

  3. Structure And Representation Of MIB Object Names - SNMP Tutorial

    30.8 Structure And Representation Of MIB Object Names We said that ASN.1 specifies how to represent ...

  4. 为什么导入数据库要加入set names utf-8

    Repinted:http://blog.csdn.NET/class1/archive/2006/12/30/1469298.aspx 为了让你的网页能在更多的服务器上正常地显示,还是加上" ...

  5. Entity Framework – (复数)Plural and (单数)Singular 表名Table names

    By default, the Entity Framework will assume that all of the names of your tables in your database a ...

  6. 为了让你的网页能在更多的服务器上正常地显示,还是加上“SET NAMES UTF8”吧

    Repinted:http://blog.csdn.net/class1/archive/2006/12/30/1469298.aspx 为了让你的网页能在更多的服务器上正常地显示,还是加上“SET ...

  7. Amazon Resource Names (ARNs)

    The following are the general formats for ARNs; the specific components and values used depend on th ...

  8. Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

    调试网站时,异常出现:Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. S ...

  9. SharePoint 2013 Error - File names can't contain the following characters: & " ? < > # {} % ~ / \.

    错误截图: 错误信息: --------------------------- Message from webpage --------------------------- File names ...

  10. mysql set names 命令和 mysql 字符编码问题

    先看下面的执行结果: (root@localhost)[(none)]mysql>show variables like 'character%'; +--------------------- ...

随机推荐

  1. ios开发之 -- stringByAddingPercentEscapesUsingEncoding方法被替换 iOS9.0

    最近在项目中,发现之前的一个方法已经不被建议使用了. 该方法名即题目中提到的: stringByAddingPercentEscapesUsingEncoding,这个方法是用来进行转码的,即将汉字转 ...

  2. 如何使用Web Service新建和更新Wiki页面的内容

    公司内部有很多部门都创建了Wiki库,来做知识共享.公司是Hosting的SharePoint环境,不能写服务器端代码,要操作Wiki只能通过Web Service来完成,所以,碰到两个情况: 1)W ...

  3. fork(), waitpid()

    NAME fork - create a child process SYNOPSIS #include <unistd.h> pid_t fork(void); RETURN VALUE ...

  4. js防止表单重复提交

    1.表单 <form id="addForm" onsubmit="getElementById('submitInput').disabled=true;retu ...

  5. SpringBoot 常见问题记录

    问题一 Error starting ApplicationContext. To display the auto-configuration report re-run your applicat ...

  6. linux关闭喇叭

    beep时常响起有时是很烦人的一件事情,在登录linux的时候关闭喇叭可以进行如下操作:在 Linux 控制台下(没有 X11),你可以使用一下命令:在 ~/.bash_profile中写入sette ...

  7. VS调试DLL项目代码

    如果DLL有对应的lib文件,并且dll工程和调用它的exe属于同一个解决方案,直接打断点调试就可以.例如OSG解决方案中的例子程序可以直接调试osgUtil模块的代码. 如果A.exe项目和A.dl ...

  8. call()、apply()、bind()

    1.均可以改变函数的执行上下文,也就是this值: 2.call()  apply() function apply(num1, num2){ return sum.apply(this, [num1 ...

  9. React Native(九)——实现仿微信朋友圈发表动态功能

    好像很久都没写博客了,罪过罪过~ 许是因为刚接触App有点生疏不得窍门吧,这个月还没有更新过文章.小个把月下来,还是觉得应该边学边总结,这样才能像大神靠近(最近刚接触同业的大牛级人物,还是从中学到了很 ...

  10. 剑指offer面试题6:重建二叉树

    1.题目:输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树. public class Solution { public TreeNode reConstructBinaryTree(int ...