Home  >  Article  >  Database  >  ubuntu mysql utf8中文乱码问题_MySQL

ubuntu mysql utf8中文乱码问题_MySQL

WBOY
WBOYOriginal
2016-06-01 13:39:17964browse

Ubuntu

bitsCN.com
ubuntu mysql utf8中文乱码问题 数据库中,使用 show variables like "char%" 查看字符编码 发现 character_set_database latin1     character_set_server latin1  导致数据库存储中文时出现乱码  修改配置文件  /etc/mysql/my.cnf    [client]下 default-character-set=utf8  [mysqld] default-storage-engine=INNODB character-set-server=utf8 collation-server=utf8_general_ci  重启动mysql:/etc/init.d/mysql restart
  bitsCN.com
Statement:
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