Home > Database > Mysql Tutorial > mySQl数据库中不能插入中文的处理办法_MySQL

mySQl数据库中不能插入中文的处理办法_MySQL

WBOY
Release: 2016-06-01 13:15:52
Original
953 people have browsed it

1. 修改MySQL安装目录下(C:/Program Files/MySQL/MySQL Server 5.5)的my.ini文件

设置: default-character-set=utf8

character-set-server=utf8

然后重启MySQL服务,MySQL 没有重启的命令,要先停止,然后再启动。开始 -> cmd -> net stop mysql -> net start mysql

2.设置表的编码格式,执行;alter table ttname CONVERT TO CHARACTER SET utf8;命令,其中ttname为表名.

Related labels:
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