Home  >  Article  >  Database  >  cmd中MySQL中文数据乱码问题解决方法_MySQL

cmd中MySQL中文数据乱码问题解决方法_MySQL

PHP中文网
PHP中文网Original
2016-05-27 14:12:101045browse

bitsCN.com 我的MySQL是默认utf8编码的,所建数据库也是设置utf8编码,使用程序可以新增中文数据,在cmd中使用SQL语句新增数据则报类似Incorrect string value: '/xB2/xE2/xCA/xD4' for column 'title' at row 1错误,而使用SQL语句查询出之前程序所新增中文数据都是乱码的。

右击在cmd界面上面边框→属性→选项 ,查看cmd的编码方式是是GBK,并不是utf-8。

其实数据库内部是没有乱码的,只是和cmd的编码方式不一样,在cmd呈现出来的中文数据才是乱码的,也造成了新增不了中文数据的情况。

使用MySQL的图形界面管理工具则不存在此问题了。bitsCN.com    

 以上就是cmd中MySQL中文数据乱码问题解决方法_MySQL的内容,更多相关内容请关注PHP中文网(m.sbmmt.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