hibernate中向mysql数据库插入汉字出现???乱码问题的纠正
来源:互联网 发布:还珠颠覆知画TXT下载 编辑:程序博客网 时间:2024/05/16 09:24
如题,试过多种方法无效后,苦思中。。。
感觉自己的mysql数据库有问题,于是从官网下载后重安装了一遍,在mysql-front 插入汉字开始也出现乱码,确定是mysql自身的问题,于是修改了my.ini文件,修改代码如下(红字加粗,两处)后在mysql-front修改问题解决,而且在由hibernate向mysql写入汉字正常。\(^o^)/~
[client]
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]
port=3306
[mysql]
default-character-set=gbk
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
#Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/Program Files/MySQL/MySQL Server 5.0/"
#Path to the database root
datadir="D:/MySQL/MySQL Server 5.0/Data/"
# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=utf8
- hibernate中向mysql数据库插入汉字出现???乱码问题的纠正
- python向mysql数据库插入汉字出现乱码问题
- 解决Hibernate向MySQL插入中文出现乱码的问题
- Mysql中插入汉字出现乱码问题
- hibernate向Mysql中插入中文乱码的问题
- Mysql乱码问题; 在java中,向数据库中插入数据出现乱码
- 使用Hibernate向Mysql中插入中文数据出现乱码
- 解决Hibernate向MySQL数据库插入中文乱码问题
- Hibernate向mysql数据库插入中文字段乱码问题
- 解决Hibernate向MySQL数据库插入中文乱码问题
- MySQL插入显示汉字出现乱码问题的解决
- MySQL插入显示汉字出现乱码问题的解决
- hibernate向mysql数据库插入中文乱码
- hibernate向mysql插入数据乱码问题
- hibernate向mysql插入中文乱码问题
- 利用编程语言向mysql中插入中文出现乱码的问题
- hibernate插入数据库出现中文乱码问题
- JDBC往MySql数据库中写汉字出现乱码的问题
- Proxy 分类
- Objective-C:GCC+GNUstep配置
- linux进程间通信概述
- WIN CE下的串口通信
- temp save here
- hibernate中向mysql数据库插入汉字出现???乱码问题的纠正
- linux系统i2c子系统
- Servlet工作原理
- 课堂作业
- proc sql 语句中的case 表达
- java虚拟机把内存分为几个区域
- zoj 3600
- Tomcat工作原理
- (转)托管代码的优点