|
jinguanding 发表于 2013-8-14 13:07 ![]()
问题:不允许重新启动的生产环境出现字符集设置不对,如何从默认的latin1修改为utf8
生产环境正确做法 ...
Hi,
我查了下如果client那边没有显示指定的话,还会是默认的,比如latin1。 具体描述可以看下面
http://bugs.mysql.com/bug.php?id=35372
Updated the description for character_set_client:
The character set for statements that arrive from the client. The
session value of this variable is set using the character set
requested by the client when the client connects to the server. (Many
clients support a --default-character-set option to enable this
character set to be specified explicitly.) The global
value of the variable is used to set the session value in cases when
the client-requested value is unknown or not available, or the server
is configured to ignore client requests:
* The client is from a version of MySQL older than MySQL 4.1, and thus
does not request a character set.
* The client requests a character set not known to the server. For
example, a Japanese-enabled client requests sjis when connecting to a
server not configured with sjis support.
* mysqld was started with the --skip-character-set-client-handshake
option, which causes it to ignore client character set configuration.
This reproduces MySQL 4.0 behavior and is useful should you wish to
upgrade the server without upgrading all the clients.
所以光是从server这边去设置是没有效果的。
|
|