---
title: 使用TPCCRunner测试MySQL，加载数据时提示Unknown initial character的解决方法
description: "使用TPCCRunner测试MySQL，在准备TPC-C测试环境并加载数据时，提示“Unknown initial character set index '255' received from server. Initial client character set can Exception in thread \"main\" java.lang.NullPointerException”。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdbs/troubleshooting/trouble/boostkit_database_troublecase_002.html
sourcePath: /source/zh/kunpengdbs/troubleshooting/trouble/boostkit_database_troublecase_002.html
indexId: a05697a6ce53b366d7da3d9ee45e4a13b90e9f2b248c98bbe66ee0f5a9a7c55c84
---
# 使用TPCCRunner测试MySQL，加载数据时提示Unknown initial character的解决方法

#### 问题现象描述

使用TPCCRunner测试MySQL，在准备TPC-C测试环境并加载数据时，提示“Unknown initial character set index '255' received from server. Initial client character set can Exception in thread "main" java.lang.NullPointerException”。


#### 关键过程、根本原因分析

MySQL驱动和数据库字符集不一致导致的问题。


#### 结论、解决方案及效果

需要修改“conf/example/mysql/loader.properties”文件，设置MySQL数据库连接使用Unicode字符集，并使用UTF-8编码方式进行数据传输。

1. 打开“conf/example/mysql/loader.properties”文件。
  1 vim conf/example/mysql/loader.properties

2. 在文件中添加以下内容。

```
useUnicode=true&characterEncoding=utf8
```


3. 重新加载数据。
