Home >Database >Mysql Tutorial >Mysql压缩版中文乱码解决_MySQL

Mysql压缩版中文乱码解决_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:32:031001browse

bitsCN.com

Mysql压缩版中文乱码解决

 

压缩版mysql不像安装版时可以直接配置、需要手动配置。

 

虽然网上有各种方法:

 

但是我的压缩版中的默认配置不在目录中的msyql.ini下,我看到里面有个mysql-default.ini文件、

 

将其重命名成mysql.ini后、简单将其配置改了下、

 

1[mysqld]01basedir = D:/Data/mysql02 datadir = D:/Data/mysql/data03 port = 330604 server_id = 11050607# Remove leading # to set options mainly useful for reporting servers.08# The server defaults are faster for transactions and fast SELECTs.09# Adjust sizes as needed, experiment to find the optimal values.10join_buffer_size = 128M11sort_buffer_size = 2M12read_rnd_buffer_size = 2M1314sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

 

使用mysqld启动,按照网上的配置编码

1

[mysql]

2

default-character-set=utf8

 

 并且在mysql命令下使用 

1set names 'utf8'

 

 查看各项配置之后,依旧乱码、

解决方法是在[mysqld]下添加如下

1character-set-server=utf8

 

果然、乱码问题解决、

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