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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...