Home > Database > Mysql Tutorial > body text

MySQL5中文乱码解决_MySQL

WBOY
Release: 2016-06-01 13:55:56
Original
924 people have browsed it

  这是最近一个很挠头的MySQL5中文乱码问题的解决方法,尝试了多位网友的建议后总算解决,短短两句话,记录如下:

  1.编辑/etc/my.cnf ,在[mysql]段加入default_character_set=utf8

  2.在编写Connection URL时,加上?useUnicode=true&characterEncoding=utf-8参数

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