2.
MySQL修改資料庫的預設編碼
-
cd /etc/mysql
ls
vi my.cnf
- 修改my.cnf
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
skip-character-set-client-handshake
collation-server = utf8_general_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
※設定檔內加入「skip-character-set-client-handshake」是為了抑制MySQL內部自行進行變換。