docs: 批量博文

This commit is contained in:
杭城小刘
2020-02-25 17:46:51 +08:00
parent 8e5d2c9e7f
commit 6e99436a9e
373 changed files with 18071 additions and 1116 deletions

19
Chapter3 - Server/3.5.md Normal file
View File

@@ -0,0 +1,19 @@
# PHP、Mysql 乱码
- 查看 Mysql 数据表字符编码
- 查看表字段编码
- 查看 PDO 连接编码
- 查看 Mysql 数据库服务器编码
这次吃亏就是在 Mysql 数据库服务器编码导致。
- 查看数据库服务器编码
```SQL
show variables like 'character%';
```
所以知道其他编码都正常,问题定位到数据库服务器编码问题。
- vim /etc/my.cnf
- character-set-server=utf8
- 重启服务器