linux下配置mysql默认编码utf8
下面是需要在对应地方加入的配置
[client]
default-character-set=utf8
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
重启mysql之后,妥妥的了
mysql> status
--------------
mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1
Connection id: 45
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.1.41-3ubuntu12 (Ubuntu)
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: utf8
Server characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 1 hour 2 min 23 sec
Threads: 1 Questions: 321 Slow queries: 0 Opens: 263 Flush tables: 1 Open tables: 23 Queries per second avg: 0.85