All Apps and Add-ons

Chinese Can't Be Displayed Correctly In DB Connect

perlish
Communicator

Hello,
Now,I just use DB connect to load my Mysql.But I have some difficulties with the charset.There are some Chinese in my DB and they can't be displayed correctly.I already write 'charset = gb2312' in '/opt/splunk/etc/apps/dbx/local/database.conf',but it seems not work.Please tell me the correct solution,thanks a lot!

0 Karma

ziegfried
Influencer

DB Connect (actually the MySQL JDBC driver) automatically uses the default character encoding configured on the database server. If a database on your server uses a different one, then it's necessary to override it for a the stanza in database.conf.

[somemysqldb]
type = mysql
...
arg.useUnicode = true
arg.characterEncoding = EUC_CN

(Note that adding arg.* options to database.conf will cause a warning message to be displayed, those can be safely ignored)

Here's a link to a chapter of the MySQL JDBC driver reference which covers character encodings: http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-charsets.html

jasontsang
New Member

The answer is no longer working on splunk db connect v2.

Anyone have a solution for db connect v2?

0 Karma

araitz
Splunk Employee
Splunk Employee

Can you open a support case so that we can get additional detail? In the meantime, I opened DBX-249 to keep track of this.

0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!