---
title: "Illegal mix of collations 错误?"
author: "maybe723"
date: "2008-10-25T09:44:12Z"
tags: ["MySQL"]
slug: "illegal-mix-of-collations"
draft: false
lastmod: "2008-10-25T09:44:12Z"
id: 257776
url: "https://maybe723.iteye.com/blog/257776"
---

数据库中查询报错:Illegal mix of collations (latin1\_swedish\_ci,IMPLICIT) and (utf8\_general\_ci,COERCIBLE) for operation '=';

 1.更改mysql的my.ini,把client和server的字符集改为utf8

 2.更改表以及字段的的字符集为utf8