Home >Database >Mysql Tutorial >Ubuntu mysql 中文乱码修复_MySQL

Ubuntu mysql 中文乱码修复_MySQL

WBOY
WBOYOriginal
2016-06-01 13:42:271002browse

Ubuntu

bitsCN.com Ubuntu 软件中心安装集成的LAMP默认mysql默认编码不支持中文,修改下配置文件就行了。
 
Ubuntu上安装mysql 插入数据出现乱码,解决办法是修改my.cnf文件
 
修改mysql配置文件:sudo vim  /etc/mysql/my.cnf 
 
 
在[cleant]和[mysqld]中加入default-character-set = utf8,
重启mysql:sudo /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