Home > Database > Mysql Tutorial > MySQL里的ERROR 1366(HY000):Incorrect string value问题_MySQL

MySQL里的ERROR 1366(HY000):Incorrect string value问题_MySQL

WBOY
Release: 2016-06-01 13:38:17
Original
881 people have browsed it

bitsCN.com


MySQL里的ERROR 1366(HY000):Incorrect string value问题

 

这个就是编码的问题,可能在装MySql的时候选择的是默认的编码,或者

选择的UTF8,所以在插入数据的时候出现编码的错误.    

 

数据不重要的话,一劳永逸的解决办法是,使用alert database databaseName 

character set utf8 更改数据库的编码格式

 

如果项目中的数据是重要数据的话,还是有解决办法的

 

使用 alter table tableName convert to character set utf8 转换需要

插入汉字的数据表编码为utf8即可.
 

bitsCN.com
Related labels:
yes
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