All Apps and Add-ons

Splunk MySQL Connector App charset problem

jcisha
Path Finder

Character display problem in question.



Splunk, MySQL, CentOS installed



@ MySQL My.cnf @



[mysql]

default-character-set = utf8

[mysqld]

character-set-client-handshake = FALSE

init_connect = "SET collation_connection = utf8_general_ci"

init_connect = "SET NAMES utf8"

default-character-set = utf8

character-set-server = utf8

collation-server = utf8_general_ci

[client]

default-character-set = utf8

[mysqldump]

default-character-set = utf8





@ Table Script @



CREATE TABLE test_table (

  code char (50) NOT NULL COMMENT 'CODE',

  name char (50) NOT NULL COMMENT 'NAME'

  PRIMARY KEY (code)

) ENGINE = InnoDB DEFAULT CHARSET = utf8;





@ Table Value @



code name

001 테스트



The value of the name field is "Korean".



@ Search Result @

| Mysqlquery spec = splunk_test query = "SELECT * FROM test_table;"



code name

"001" "???"





Are displayed as question marks.

Do you know how to solve the problem?

0 Karma

idaaa
Explorer

When you execute search at splunk web, try these search commands :

| Mysqlquery spec = splunk_test query = "SELECT code, cast(name as binary) FROM test_table;"
or
| Mysqlquery spec = splunk_test query = "SELECT code, convert(name using utf8) FROM test_table;"

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...