Home > Database > Mysql Tutorial > 关于mysql字符编码设置_MySQL

关于mysql字符编码设置_MySQL

WBOY
Release: 2016-06-01 13:01:22
Original
966 people have browsed it

在mysql中插入数据一直显示是???乱码,网上很多人说的试了都不对,后来经过大量查询资料,将解决方案写在下面,不同的版本有不同的解决方案吧。我的数据库版本(5.5.40)

[client]

default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
collation-server = utf8_unicode_ci
init-connect=’SET NAMES utf8′

character-set-server = utf8

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template