对于Ubuntu的Mysql中, 选择UTF-8编码
当在Ubuntu中安装Mysql时, 默认的编码集可能是latin-1. 既然Ubuntu使用UTF-8作为大多数东西的编码集, 这样(latin-1)做就有点奇怪了. 但实际上很容易设置.
Mysql的配置文件 /etc/mysql/my.cnf 有神奇的一行:
!includedir /etc/mysql/conf.d/
这就使得它包含的设置都位于 conf.d 的子目录下. 不推荐去直接改变 my.cnf文件, 因为它会导致一些问题, 当在升级 Ubuntu/Mysql 到一个新的版本时.
创建一个新文件: /etc/mysql/conf.d/utf8_charset.cnf 有下面这些内容
Mysql 5.1
[mysqld] default-character-set=utf8 [client] default-character-set=utf8
Mysql 5.5
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
[client] default-character-set=utf8
重启mysql, 然后你将会拥有UTF-8的编码集:
$ mysql -u root -p -e "show variables like '%character%'" +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+
相关推荐
11.6.1-packet-tracer---switch-security-configuration_zh-CN.pka
官方离线安装包,测试可用。请使用rpm -ivh [rpm完整包名] 进行安装
On HFS+ filenames are internally stored in UTF-16 and when converted back to UTF-8, for the underlying BSD system to be handable, NFD is created. See ...
dip-switch -microblaze-dip-switch-microblaze.zip
CCNP Routing and Switching SWITCH 300-115 Official Cert Guide
2.9.2 Packet Tracer - Basic Switch and End Device Configuration - Physical Mode.pka
bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql/mysql-5.7.22/ --datadir=/usr/local/mysql/mysql-5.7.22/data --lc_messages_dir=/usr/local/mysql/mysql-5.7.22/share --lc_messages=en_US ...
源码参考,欢迎下载
代码如下:Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0 很明显这是连接初始化阶段就丢失了连接的错误。 google半天大多是说的注释掉配置文件中 bind-address = ...
2.9.1-packet-tracer---basic-switch-and-end-device-configuration_zh-CN.pka
Switch-Mode Power Supplies - SPICE Simulations and Practical Designs.pdf
发人员通过host switch plus Chrome插件,可以快捷方便的切换、设置 hosts Chrome插件,而不用修改系统 hosts 文件,方便web开发人员在 测试/开发/线上 等环境快速切换;同时顺便支持本地端口..
电源+硬件设计+AN-4162-Switch-Node-Ring-Control
hierarchical framework called Switch-and-Navigate (SAN), which consists of a global switch policy for determining the best domain to visit and a local navigation policy per domain for searching for ...
Laravel开发-switch-array-key-extension 按其键之一获取对象集合
离线安装包,亲测可用
pure-css3-pretty-switch-button-易语言.zip
css3-switch-light-button.zip
- Display : Set to OFF disables the video card information reported in the validator. Parameters ---------- -txt=filename : Launch CPU-Z in ghost mode (no interface appears) and generates the ...